Prevent commit?

wyverex

Member
Hello,

I'm writing a 3-tier application. On the client side I have, among others, a TClientDataSet that sends a bunch of create table and alter table statements to the RemoteModule using the CommandText property.

In the RemoteModule, there is a corresponding Provider and OracleDataSet component.

Now my problem is that every call to TClientDataSet.Execute automatically commits the changes. Although I have set TOracleSession.AutoCommit = false and TOracleDataSet.CommitOnPost = false.

Furthermore I never explicitly call Commit.

That's quite a pain when an error occurs during this bunch of statements. Then I have to rollback the changes manually by executing "drop table" statments where in turn errors can occur etc...

Do you have any idea how I can disable this auto commit?

(The same holds for TClientDataSet.ApplyUpdates. Any changes will automatically be commited to the database)

thx in advance
 
Hello,

any DDL statement is automatically commited by Oracle, so I think that this is your problem. If you need to do a lot of DDL then split it up to single scripts and execute them seperatly and handle the errors seperatly. And write your scripts to handle existing objects (dynamic SQL and so on) so you don`t have to drop already created objects.

greetings,
Uli
 
Back
Top