>Hi Eric,
> I will try this also but the ans which you have given previously
>was perfect and that only i want but in FoxPro we can select some
>fields from temp cursor also so i am trying to apply the same logic
>in VB and in that I found this problem. so can we select some
>fields from temp cusor in VB or is there any onther method to
>retrive fields from temp cursor.
You can't query a Recordset. You have to query against a datasource (like a table).
But why do you want to query a recordset? You can apply filter to it, you can sort it, you can find it, ...
If you simply don't want to display all the columns of your recordset into the DataGrid, goto the Datagrid properties (in Custom) and add only the desired columns.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com