0

In Delphi XE I use ADO and SQL Server databases.

I have two almost identical databases in two different servers. The tables in the first server are being updated and inserting new rows. The tables in the second server should be updated with newly added and newly updated data from the first server tables. Now I query data from the first server using last id and last update date from the second server, make queries in do while cycle for inserting and for updating data.

Is it possible to compose a query in ADO to insert data from other server in one ADOquery and to update data from other server in one ADOquery?

7
  • Please provide a minimal reproducible example with examples of the inserts and updates you need to carry out. Commented Dec 30, 2024 at 7:15
  • I think this question pretty much covers it stackoverflow.com/questions/1980139/… Commented Dec 30, 2024 at 8:09
  • @DaleK I am not sure if Delphi also has the transactionscope available, that question is about c# Commented Dec 30, 2024 at 11:48
  • @GuidoG actuthaving a distributed transaction doesn't solve the issue anyway, that's still reading from one database on one and writing on another. No, I took from the linked question that the only way to avoid the double connection is to have a linked server. Commented Dec 30, 2024 at 21:08
  • Although I did also assume that ADO on different platforms provides the same features - not that it helps here. Commented Dec 30, 2024 at 21:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.