DataTable record access

K

keithb

Is there any way to directly access a DataTable record, or is sequential
access the only way? Does having a foreign key contraint between parent and
child DataTables in any way facilitate accessing child table records?

Thanks,

Keith
 
C

Cowboy \(Gregory A. Beamer\)

keithb said:
Is there any way to directly access a DataTable record, or is sequential
access the only way?

it depends. Once loaded in a table, you can query for records, which is not
possible in a DataReader while building the table.
Does having a foreign key contraint between parent and child DataTables in
any way facilitate accessing child table records?

Yes, esp. with Strongly Typed DataSets. To do so, you have to add
relationships to the two DataTables (in a DataSet) and ask for child rows.
With Strongly Typed DataSets, there is intellisense. I wrote a blog entry on
STDs earlier today:

http://gregorybeamer.spaces.live.com

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think Outside the Box!
*************************************************
 
K

keithb

Awesome blog!!! Thank you

When you say "Once loaded into a table, you can query for records," do you
mean a database table, or can you somehow query against a DataTable? If so,
please tell me how?

Thanks,

Keith
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top