Timbo
User
 Junior Boarder
| Posts: 15 |   | Karma: 0 |
|
Problem with Transaction und DatabaseLinks
|
|
Posted: 2007/12/06 10:56 |
|
|
|
|
Hello,
I've tried now for a few hours to understand the problem. Wenn I use this code I get a ora-01453 SET TRANSACTION muss erste Anweisung sein Error
01 ADQuery.Active:=false;
02 ADQuery.Sql.Clear;
03 ADQuery.Sql.Add('SELECT MyCol FROM MyTable@LinkedDatabase WHERE ID=1');
04 ADQuery.Active:= true;
05 showmessage(ADQuery.FieldByName('MyCol').AsString);
06
07 try
08 ADQuery2.Active:=false;
09 ADQuery2.Sql.Clear;
10 ADQuery2.Sql.Add('insert into MyTable@LinkedDatabase (MyCol )values(''test'')');
11 ADConnection.StartTransaction;
12 ADQuery2.ExecSQL;
13 ADConnection.Commit;
14 except
15 ADConnection.Rollback;
16 end;
|
The showmessage appears with the corect value but then the exception comes.
I have restartet Oracle several times, but nothing changes, ssame problem
If I use it local without @LinkedDatabase it works fine.
When I only use the second statement with insert, it works too.
Post edited by: Timbo, at: 2007/12/07 02:25
Post edited by: Timbo, at: 2007/12/07 02:26
Post edited by: Timbo, at: 2007/12/07 03:11
|
|