 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
ZHANG JOHN Guest
|
Posted: Thu May 06, 2004 5:42 am Post subject: re:rollback the storedproc |
|
|
hi,all:
this promgram connected to sqlserver2000 by ODBC.
Now I want to cancel(rollback) all done in the remote storedproc.
But I fail.
Mycode as follows:
with query1 do
begin
sql.add('begin transaction');
storedproc1.ExecProc;//(insert some data into a table)
sql.add('insert table1 (a1 )values (''asdfghj2'')');
sql.add('rollback transaction');
execsql;
sql.Clear;
sql.Add('select * from table1');
open;
first;
end;
After run, it canceled the last insert ( sql.add('insert table1 (a1 )values
(''asdfghj2'')') .But the insert in the storedproc1
were not canceled(rollbacked).
What shall I do FOR THIS?
Rgds
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|