BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

re:rollback the storedproc

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
ZHANG JOHN
Guest





PostPosted: Thu May 06, 2004 5:42 am    Post subject: re:rollback the storedproc Reply with quote



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'')')Wink.But the insert in the storedproc1
were not canceled(rollbacked).

What shall I do FOR THIS?
Rgds


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.