473,480 Members | 2,277 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to pull record(s) from other adapter

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
4 918
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2190
by: Chumley the Walrus | last post by:
IN my code behind .vb page for a delete records script (this also does a deletion confirmation with a javascript popup, this gets called on my front .aspx page with the datagrid), I'm not sure if...
0
4505
by: Zorba.GR | last post by:
IBM DB2 Connect Enterprise Edition v8.2, other IBM DB2 (32 bit, 64 bit) (MULTiOS, Windows, Linux, Solaris), IBM iSoft Commerce Suite Server Enterprise v3.2.01, IBM Tivoli Storage Resource Manager...
4
1769
by: Rich | last post by:
Hi, I keep getting an error when I try to insert a new record into a table (SQL 2000) that has a column that I've configured as 'Unique Null Allowed'. I used Visual Studio (2003) IDE SQL Data...
0
784
by: jaYPee | last post by:
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...
0
4512
by: Mateusz [PEYN] Adamus | last post by:
Hi I have a Typed DataSet. I've databinded it to some text controls on my form, controls show data when I show record. But now I would like to create a new record with this form, controls...
1
2494
by: vbDavidC | last post by:
I am adding a new record to a table via a dataset/adapter. I have got the following to work for me but I am wondering if there is a better way to do this. I am having to have something in my...
4
1912
by: sparks | last post by:
We have a new project here, one that I have never tried maybe its easy I don't know yet. We have people that have records dating back over 5 yrs on a sql server. We have to build an access 2003...
0
1010
by: Stardust | last post by:
Hello everyone! I am new to VB.NET so please accept my apologies if the question is too easy. I created a concise code to explain the problem I have. I have an Access database that contains...
5
1959
by: Rachel Garrett | last post by:
If I created a Recordset in VBA, how do I make certain fields show up in a form?
0
7048
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7050
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7091
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6743
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5344
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
2988
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
564
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.