want to bind with datagrid aftr a query

welll guys i hv a prob here..

i want to bind the result of a query to the datagrid .. how to do it??

m working on vb.net windows applctn

i want the result of the query to b fed into the dataset or data adapter.. so tht i can bind it wid the datagrid

plzz help me wid the code...

i m able to display the whole data from the table .. but i want to display data for eg...

whn emp_id=3... or name = sam.. fine?

now these are taken frm the txtboxes and fired wid the requird query.. which will gv me a specific numbr of rows... now i want to c this result in the datagrid...

the datgrid wil have only 1/2 rows(only the result) of data whereas the actual table may have 15 records
guys did u get me??
[770 byte] By [sanhitasinha] at [2007-11-20 1:34:44]
# 1 Re: want to bind with datagrid aftr a query
Hi,

Am I right in assuming you would like filter a Table in a dataset after you have retrieved the data from the DB.

for Example you have done a query on the DB like this
"select * from Customers" and now you want to supply the client with the oppurtunity to filter the rows? i.e "Select * from Customers where Country = 'UK'" ?

if this is the case you can do something with the Select method of the datatable

ds.Tables[0].Select(strFilterQuery);
cykophysh at 2007-11-10 3:12:23 >