Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Database Copy Loses Primary Keys

Database Copy Loses Primary Keys

Database Copy Loses Primary Keys

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?

RE: Database Copy Loses Primary Keys

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close