0

I imported using ODBC tables into access from SQL server but the tables lose all PK and FK integrity. My PKs are no longer required when i got to design view in access?

Batman
  • 5,563
  • 18
  • 79
  • 155

1 Answers1

1

Importing your table schema + data won't fully transfer your database.

Remember that Indexes, FK Constraints, Stored Procedures and so on are independent objects such as Tables. These objects' definitions should be translated between the two databases when you are willing to do such migration.

J.Hudler
  • 1,238
  • 9
  • 26
  • Oh ok, cause ive only been selecting dbo.MY_TABLE and importing that. – Batman Nov 29 '12 at 21:36
  • When you say they should be translated do you mean it is something that can be imported using ODBC or something i need to do in access manually – Batman Nov 29 '12 at 21:43
  • The way you connect to both your databases (ODBC, Ole DB, .Net Provider) doesn't matter. You can't import these definitions automatically. What you need to do now is read your source database schema and perform (translate) all the `CREATE INDEX`, `ADD FOREIGN KEY`, ..., on your destination database. – J.Hudler Nov 30 '12 at 10:50