updating table in external database

G

Guest

Hello,
is there a way to use an UPDATE statment to update table in an external
database?
I need to build a patch that will modify some data in a database that is
fa...far....far from me. The database is huge: no way to have it by email.
So i was wondering if there is way to overcome these troubles by building a
patch. A sort of small database, just one form that will ask for the database
to be updatted and get from here its path. Then the code will take care os
updating the tables with a series of:
DoCmd.RunSQL("UPDATE....") etc...
I was trying somethign like this:
UPDATE Tbl1 IN 'C:\Documents and Settings\WhateverItWillBe\MyHugedb.MDE'
INNER JOIN (SELECT field1,field2 FROM Tbl2 IN 'C:\Documents and
Settings\WhateverItWillBe\MyHugedb.MDE' WHERE MyConditionHere) ON
Tbl1.ID=Tbl2.ID
SET Tbl1.field4=Tbl2.field2

It doesn't work...sic*

There is something wrong (surely yes), but before I go further with my
efforts: is this kind of *thing* possible?

Thanks
Rocco
 
B

Brendan Reynolds

You can only have one 'IN' per query, so it isn't going to work with your
multi-table queries.

An alternative would be to create links to the tables in the external
database, and run your UPDATE queries against the linked tables.

Another alternative would be to use DDL queries to create your UPDATE
queries in the target database, and then execute them against the local
tables.

The first alternative is probably the simpler one. Create links to your
local copy of the database (I'm assuming you do have a local copy?) and use
the code at the following URL to refresh the links on the target PC ...

http://www.mvps.org/access/tables/tbl0009.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