By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,759 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

how to pull record(s) from other adapter

P: n/a
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.
Nov 21 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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" wrote:
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.

Nov 21 '05 #2

P: n/a
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" wrote:
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.

Nov 21 '05 #3

P: n/a
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
"jaYPee" <hi******@yahoo.com>
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.

Nov 21 '05 #4

P: n/a
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
"jaYPee" <hi******@yahoo.com>
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.

Nov 21 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more Visual Basic .NET Questions on Bytes