all groups > dotnet windows forms databinding > september 2006 >
You're in the

dotnet windows forms databinding

group:

Access relationships & dataset wizard


Access relationships & dataset wizard YojoaDon
9/20/2006 12:49:02 PM
dotnet windows forms databinding:
I have a minor issue with creating a dataset from an Access DB in VB2005. My
Access DB has table-relationships going four tables deep. That is, the key
field of table one has a one-to-many relationship with a field in table two.
The key of table two has a one-to-many relationship with a field in table
three. The key of table three has a one-to-many relationship with a field in
table four. Whenever I use the VB2005 data source wizard to create the
dataset, although everything else is fine, the resulting dataset does not
have the table three to table four relationship. In design view, table four
is just sitting off to the side by itself, disconnected. I've checked in
Access, and everything is fine in my table. And, I can manually add the
relationship. It just puzzles me that the relationship never shows up when I
use the wizard to create the dataset.
--
RE: Access relationships & dataset wizard v-lliu NO[at]SPAM online.microsoft.com
9/21/2006 3:32:59 AM
Hi Yojoa,

I perform a test according to your description, but I don't reproduce the
problem.

I create an Access DB with Access 2003 and add four tables called Table1,
Table2, Table3 and Table4 in the DB. I set up three relationships between
the four table(one-to-many relationship between Table1 and Table2,
one-to-many relationship between Table2 and Table3 and one-to-many
relationship between Table3 and Table4).

In VS2005, I set up a Windows application project( I have tried VB.NET and
C# projects, both have the same result). From 'Data' menu, select 'Add New
Data Source' to open 'Data Source Configuration Wizard'. With the data
source configuration wizard, I specify the Access DB file and select the
four tables from the DB. After the wizard finishes, the four tables appears
in the newly created dataset. The three relationships among the four tables
are also created.

The VS I'm using is Visual Studio 2005 Version 8.0.50727.42
(RTM.050727-4200) and the version of Access is 2003. Could you tell me what
versions of VS and Access are on your machine?

Since the data source configuration wizard couldn't copy the third
relationship to the dataset, you may have a try adding the four tables
manually into the dataset. To do this, go to 'Project' menu and select 'Add
New Item'. In the 'Add New Item' window, select 'DataSet' template and
press 'Add' button. Drag the four tables from Server Explorer and drop them
onto the dataset designer. Then check if the three relationships are all
created in the dataset.

Hope this helps.


Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button