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

Dataset and datatables

P: n/a
Hi,

I just wanted to ask a quick question regarding datasets.
I am creating 3 tables using a dataadapter. what i want
to know is that is the relationship created between these
datatables automatically?? Will the integrity rules
automatically be enforced or do i need to recode this in
vb.net?

Also do the datatables created have the same schema as my
underlying database tables? i.e will the datatables also
have primarykeys that are autonumbers (as they were
created in my access DB)?
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
the tables will have the same schema as the query that you use...if you
SELECT Field1, Field2 but there are ...Field50 in the table, only Field1 and
2 will be in the new schema.

You can explicitly set your keys if you want and can create keys that don't
exist on the DB side if you want...the sky is the limit there...PrimaryKeys,
AutoIncrement, Seeds, all of it.

Check out my article on DataRelations....
http://www.knowdotnet.com/articles/datarelation.html Unless you are using a
Typed DataSet, you'll need to peg the relations using the DataRelation
object.

HTH,

Bill
"Jade" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,

I just wanted to ask a quick question regarding datasets.
I am creating 3 tables using a dataadapter. what i want
to know is that is the relationship created between these
datatables automatically?? Will the integrity rules
automatically be enforced or do i need to recode this in
vb.net?

Also do the datatables created have the same schema as my
underlying database tables? i.e will the datatables also
have primarykeys that are autonumbers (as they were
created in my access DB)?

Jul 21 '05 #2

P: n/a
Jade,
You need to define the relationships in the DataSet yourself, I find using
an XSD file the easist way to achieve this. Whether or not you enable the
"Typed DataSet" ability of the XSD file. Of course creating DataRelation
objects in code & adding them to a DataSet is a useful alternative.

David Sceppa's book "Microsoft ADO.NET - Core Reference" from MS Press
covers the DataSet, DataTable, DataRelation & Data Adapters in great detail.
It is a good tutorial on ADO.NET as wall as an excellent desk reference once
you know ADO.NET.

Hope this helps
Jay

"Jade" <an*******@discussions.microsoft.com> wrote in message
news:02****************************@phx.gbl...
Hi,

I just wanted to ask a quick question regarding datasets.
I am creating 3 tables using a dataadapter. what i want
to know is that is the relationship created between these
datatables automatically?? Will the integrity rules
automatically be enforced or do i need to recode this in
vb.net?

Also do the datatables created have the same schema as my
underlying database tables? i.e will the datatables also
have primarykeys that are autonumbers (as they were
created in my access DB)?

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.