Home > Back-end >  Adoquery how can do not let it automatically submits, but let me manual submission
Adoquery how can do not let it automatically submits, but let me manual submission

Time:10-28

Statements below
Fq:=TADOQuery. Create (nil);
Fq. Connection:=c_common. MBDataBase;
Fq. Close;
Fq. LockType:=ltBatchOptimistic;
Fq. SQL. Text:='... ';
Fq. ExecSQL;
This statement is automatically submitted to the database, how can do not let it automatically submits, but let me manually submit
Such as:
Fq. Connection. BeginTrans;
Fq. ExecSQL;
Fq.Connection.Com mitTrans;
How should do? The younger brother novice, masters to help you, please

CodePudding user response:

This is the same, you are just added something

CodePudding user response:

Then you can perform CommitTrans where to submit

CodePudding user response:

Add transaction before execSQL,
ADoconnection1. BeginTrans
Fq. ExecSQL;

Then where you want to commit, such as under the button click event and add
ADoconnection1.Com mitTrans;





  • Related