如何对两个不同的DATABASE同时更新,错误并撤消返回!(50分)

  • 主题发起人 主题发起人 microming
  • 开始时间 开始时间
M

microming

Unregistered / Unconfirmed
GUEST, unregistred user!
DELPHI中帮助如下,可就是对单个DATABASE进行操作,但我现在的数据库是在两个不同的
DATABASE中,(不并在一个DATABASE中),如何才能同时进行保存,错误后又可同时返回
with CustomerQuery do
begin
Database1.StartTransaction;
try
ApplyUpdates; {try to write the updates to the database};
Database1.Commit; {on success, commit the changes};
except
Database1.Rollback; {on failure, undo the changes};
raise; {raise the exception to prevent a call to CommitUpdates!}
end;
CommitUpdates; {on success, clear the cache}
end;
 
难!听听!
 
自己摆平了,操作一样
 
后退
顶部