Importing SQL Server data with relationships

D

Don

Hello, I want to import data that's stored in a SQL Server into Access, Is
there a way to pull in the relationships as well? I know when you do linked
tables you can see the relationships but when I import the data I don't see
the relationships.

I currently store the tables I want in a access table, then though VBA code
first delete the imported tables(if they exist) and then reimport them.

Thanks

Don
 
J

John Vinson

I currently store the tables I want in a access table, then though VBA code
first delete the imported tables(if they exist) and then reimport them.

Rather than deleting and recreating the tables, consider running
Delete queries to empty them and then Append the data - leaving the
structure, formats, relationships, security, etc. intact.

Whichever way you do it, compact your database frequently - emptying
and reloading the database will not free up the space formerly
occupied and your database may bloat rapidly.

John W. Vinson[MVP]
 
T

Tony Toews

Don said:
Hello, I want to import data that's stored in a SQL Server into Access, Is
there a way to pull in the relationships as well? I know when you do linked
tables you can see the relationships but when I import the data I don't see
the relationships.

I currently store the tables I want in a access table, then though VBA code
first delete the imported tables(if they exist) and then reimport them.

To add to John's reply remove the data in reverse relationship order.
That is child tables and then their parent tables. When importing
data import the records in the parent tables and then import the
records in the child tables.

And I'd compact that database after every import.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
 

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