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!

Database Copy Loses Primary Keys

Status
Not open for further replies.

Baesucks

Programmer
Mar 10, 2008
37
US
I have an Access ADP that works well with a SQL Server database. I want to leave that ADP and the associated SQL Server database as is, but make a copy of both the database and the ADP that I can modify to make a slightly different application.

I used SQL Server Management Studio to make the copy of the SQL database to another name, then copied my ADP to another name, modified the database server connection in the new ADP. It is seeing the correct database, but the new copy does not contain the primary keys on any of the tables (making it so I can't update the data in the tables from the ADP).

Is there a way to copy the database & ADP so that the primary keys are in place in the copy as they were in the original?

As I'm writing this, I see that the problem was in copying the SQL Server database, not really the ADP file. I should probably post the question in SQL forum, but perhaps someone can help me here. Any suggestions?
 
My question would be if in SSMS you see the primary keys or not?

If not, it is a SQL/Methoodology issue.

If you do, I would start with a blank ADP file, set the connection to pick up the tables. Hopefully you will see the keys then and subsequently import all the other objects from the original ADP file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top