Link Tables to SQL Server DB - Unique Record Identifier

J

Jason Gyetko

I'm linking tables to an SQL Server database programatically when my form
loads. The links work fine, but I'm getting prompted to "Select Unique
Record Identifier" when each tabe link is created. Is there anyway to
respond to this or set it programatically? Or is this something I need to
take care of within SQL Server? Here is what I'm running to link my table
right now:

DoCmd.TransferDatabase acLink, "ODBC Database", "ODBC;DSN=asset
data;UID=userid;PWD=password;LANGUAGE=us_english;DATABASE=asset data",
acTable, "Assets", "Assets"

Any help would be greatly appreciated. Thank you.
 
V

Van T. Dinh

You need a PrimaryKey in your SQL Server Table. When you link to the Table
from Access, the PK will take care of it.

Also, Access seems to like a TimeStamp Field in the SQL Table.
 
J

Jason Gyetko

Thanks, I created the tables by importing from Access. It must not have
brought over the Primary Keys.
 

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

Top