using SAVEPOINTS problems

aamax

Member
Hi all,

I'm having trouble using SavePoint and RollBackToSavePoint.

I set the savepoint using:

OracleSession1.SavePoint('SP1');

and then attempt to roll it back using:

OracleSession1.RollBackToSavePoint('SP1');

but it raises an exception reporting that the savepoint wasn't set? I step through the code and it hits the line that sets the save point..

Any help would be great...
 
If any commits have occurred (at all) then you won't be able to rollback to this savepoint. Throw the Oracle monitor on this particular code if you have it and you'll be able to see if a commit is occurring.
 
I am not sure if a commit is being issued or not, will try and look into it (and thanks for the feedback). I get the message that "You need to have a properly installed version available" when I try to run the monitor... why am I getting that? I thought I did have a properly installed version
smile.gif


Thanks in advance..
 
The Oracle monitor is a separate installation (I think) so I believe you'll get that error until you've installed it. If I was you I'd put a code snippit with both the above lines of code right next to each other and run it. That'll at least tell you if the Savepoint function is working correctly. Once you've confirmed that, I'd look at the datasets (if you're using them), and make sure you don't have CommitOnPost on. If you can get Oracle Monitor going, that'll make all of the above trivial, as you can simply look at the SQL being fired and see if a commit is occurring.

Hope that helps...sorry about the vague post last time.
 
Back
Top