dbTalk Databases Forums  

Linking tables to MSSQL -- key/identifer issue

comp.databases.ms-access comp.databases.ms-access


Discuss Linking tables to MSSQL -- key/identifer issue in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jeff Norville
 
Posts: n/a

Default Linking tables to MSSQL -- key/identifer issue - 03-10-2011 , 05:15 AM






We're using Access as a 'temporary' gateway to a fairly complex SQL Server backend. Today I stumbled into an issue between DB design and this interface -- I don't even know if this is a bug, really.

When I link to a DB table with NO primary key, Access prompts for "unique record identifier." The table in question has two foreign keys (but is designed for nulls), so I selected those -- and I get the wrong results. Access reports records in something of an unfortunate Cartesian query...

Specifics. The table ObjectGroup contains:
GroupID (fk, int, not null)
ObjectID (fk, int, not null)
SampleID (int, null)
LocationID (int, null)
SortOrder (smallint, not null)

A couple of the SampleID fields were associated with the wrong fk fields, which was just a lucky catch. (No, I don't have any influence over design at this point. Happy cog.)

Is there an appropriate solution to match this type of table design in Access? What's the allegory for Access's unique identifier? This applied PKs across the fields, which isn't appropriate for creating a "mirrored" data tool.

Thanks for your insights,
Jeff

Reply With Quote
  #2  
Old   
Rick Brandt
 
Posts: n/a

Default Re: Linking tables to MSSQL -- key/identifer issue - 03-10-2011 , 06:08 AM






Jeff Norville wrote:
Quote:
When I link to a DB table with NO primary key, Access prompts for "unique record identifier." The table in question has two foreign keys (but is designed for nulls), so I selected those -- and I get the wrong results.
Don't select any fields. Just cancel out of that dialog. This makes
the link read-only which is exactly what a table with no PK should be.

There can be serious ramifications to selecting fields in that dialog
that do NOT constitute actual uniques values in the table.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.