Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access table with odbc link to sqlsvr shows repeated data in records 1

Status
Not open for further replies.

cmgrn

Programmer
Nov 28, 2001
43
0
0
US
Hi,
I have an MS Access 2002 table with an odbc link to an SQL Server 2005 view.
If I open the table in datasheet view and look at an employee's 3 records, they all appear identical.
If I use a make-table query and write all the linked table's records to a work table then the employee's 3 records all appear unique in the work table.
Using linked table manager does not seem to have an effect on the linked table's problem.
Using a select query on the linked table returns strange results but the 'same' select query on the work table shows correct results.
I know that the employee's 3 records are actually all different, so, I do not understand why directly using the linked table seems to show different/wrong results but using the work table that was freshly loaded from the linked table seems to work correctly.
Thanks in advance for any help someone can provide.
 
Does access recognize the sqlsvr's primary key ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi,

Thanks!

I went back and checked and the linked Access table had a single field marked as a unique index when the field itself is not unique to every record.

Then, I used SQL Server Management Studio to check for the real index of the view that I was linking to but it doesn't seem to have an index defined.

So I relinked to the view twice more in Access.

Once to make a multi-field unique index and again to make a link with no index.

Both of those links seem to work properly.

Now I need to review past links to be sure they are correct.

Thanks for your help! I don't think that I would have ever thought of the index being wrong.
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top