is UPDATE or DELETE QUERY able to touch another database?

M

mezzanine1974

Is it possible to UPDATE or DELETE any record which is located on
another database table, by using update and delete query?
I can manipulate a table on another database by using APPEND and MAKE
TABLE query.
Thank you for any help.
 
D

Douglas J. Steele

UPDATE [;DATABASE=E:\Folder\File.mdb].TableName
SET Field2 = 4
WHERE Field1 = 2

DELETE FROM [;DATABASE=E:\Folder\File.mdb].TableName
WHERE Field1 = 3

Of course, you can also just link to the table.
 
M

mezzanine1974

Hello Doug,
Thanks for your explanaiton.
I tried all combinations below but i failed. Could you please clarify.
I can not fix Syntax problem.

UPDATE [;\\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb].Tbl_Nakladnaya
UPDATE [;' \\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb'].Tbl_Nakladnaya
UPDATE ' ;\\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb'.Tbl_Nakladnaya
UPDATE ";\\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb".Tbl_Nakladnaya
UPDATE [' \\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb'].Tbl_Nakladnaya
UPDATE ' \\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb'.Tbl_Nakladnaya
UPDATE "\\mer_rus_1\financedata$
\X_FROM_YULIA_TO_LILIYA_X.mdb".Tbl_Nakladnaya
 
D

Douglas J. Steele

You're mssing the DATABASE= part of the address:

UPDATE
[;DATABASE=\\mer_rus_1\financedata$\X_FROM_YULIA_TO_LILIYA_X.mdb].Tbl_Nakladnaya
 
M

mezzanine1974

It is working excellent now!
I tried before with DATABASE part and failed. But i understood that
SET and WHERE parts of my SQL code was wrong.
Thank you Douglas
 

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