The code is: S
QLCB=create TRANSACTION
SQLCB. DBMS="ODBC"
SQLCB. The AutoCommit=False
SQLCB. DBParm="ConnectString='DSN=TestLocal; UID=' '; The PWD="'
"
Connect using SQLCB;
If SQLCB. Sqlcode<0 then
Messagebox (" database error ", "unable to connect to a local database! TestLocal "+ SQLCB SQLErrtext)
End the if
Li_rowcount=8;
Insert into dztable_info (table_num) values (: li_rowcount) using SQLCB;
commit;
Insert the data no problem in the development environment, to exe is washed-up, exe folder DLL and other documents in need, really don't understand please give advice or comments?
CodePudding user response:
Commit the using SQLCB;CodePudding user response:
Upstairs, positive solutions should be commint using SQLCB;Also, the insert into statement, should be timely judge SQLCB. Sqlcode return values, in order to judge the success of
Insert into dztable_info (table_num) values (: li_rowcount) using SQLCB;
If SQLCB. Sqlcode<> 0 then
MessageBox (" prompt ", "new data failed:" + SQLCB. Sqlerrtext)
The rollback using SQLCB;
The else
Commit the using SQLCB;
end if
CodePudding user response:
Likely to readonly ODBC configuration pageCodePudding user response:
Because you didn't add connection dbparm CommitOnDisconnect='No',You finish operation and close the development environment, automatically submitted,
Have you finish the SQL execution to commit using transaction;
Pay attention to the transaction must be correct
CodePudding user response: