usa esta funcion (esta en c#)
Código:
public static DataTable dttSelectDistinct(DataTable SourceTable, params string[] Columns)
{
DataTable Result = new DataTable();
if (SourceTable != null)
{
DataView DView = SourceTable.DefaultView;
try
{
DView.RowFilter = null;
Result = DView.ToTable(true, Columns);
}
catch (Exception ex)
{
string errMessage = "";
for (Exception tempException = ex; tempException != null; tempException = tempException.InnerException)
{
//errMessage += new SGS.CFG.Functions().preparaMsgError(tempException.Message);
}
}
}
return Result;
}
como parametros le pasas un datatable con los datos a filtrar, y un arreglo de string, con las columnas que quieres que se le aplique el distinct
espero te sirva
salu2
PLCH