how to pull record(s) from other adapter

  • Thread starter Thread starter jaYPee
  • Start date Start date
J

jaYPee

I'm wondering if it is possible to pull a record(s) from an adapter
and put it on a datagrid based on the criteria on the form.

example:
sqldataadapter1 contains "course" table. and i want to pull 1 or more
records from this table and put it on a datagrid.

thanks in advance.
 
Create a new datatable as a clone of the original. Loop through the rows of
your original datatable. When you get to rows that match your criteria,
create a datarow from that row:

dim DR as datarow = OriginalDatatable.rows(i)

Then import the row into your cloned datatable:

ClonedDatatable.importrow(DR)

When complete, set the datasource of the datagrid to the cloned datatable.

www.charlesfarriersoftware.com
 
jaYPee,

I thought that you where not new to this newsgroup, so I do not know if you
just means the dataview.

With that you can set a dataview.rowfilter, which does what you ask in my
opinion or because that the adapter takes care of the SQL Select command,
just a where clause in that..

When this is not the answer, can you than reply, else I hope that it helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top