Importing data from SQL Server indirectly

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, I'm wondering if there is a better way to do this. I need to be able to
access data from a SQL Server database, but unfortunately we have no means of
directly connecting to that database, so the best we can do is get a data
dump of some kind from it. The db admin gave me a dump of the tables in an
Access db. The downside to that is that the relationships are lost by doing
it that way.

Regardless though, relationships can be recreated, and I have done that with
the first data dump, and I integrated a couple more tables with the imported
tables. The problem I am going to run into is in bringing in new data from
the next data dump. What I'm doing is removing all the existing data from
the tables and then appending the data from the data dump. As long as I
delete and append everything in the right order, then it should work fine.
The problem is the data that is not part of the dump, but exists only in this
database. I'm guessing I need to break the relationship before I start
deleting data, and then recreate it after, but I'm not sure how to do that in
code. Can anyone explain how to do that, or suggest a better way of doing
this? Thanks!
 
Hi Bagger,

I'm not absolutely sure I understand the situation, but probably the
thing to do is to create two sets of queries, each of which joins a
table in the newly "dumped" databas(D) to its counterpart in your
database (Y). One query in each pair should append records in D that
don't exisit in Y; the other should update records in Y from their
(possibly updated/edited) counterparts in D. The order in which they can
be run is of course determined by the relationships in Y.
 
Back
Top