ODBC - MySQL Commit Error
- Posted by Rad <radhx at rediffmail.com> Nov 04, 2005
- 496 views
Hi, I am using euphoria odbc.e v1.33 with MySQL Database v5.0.6 + MySQL ODBC driver v3.51 on WinXP (SP2). Created MySQL entry under User DSN. MySQL by default has autocommit set to true. (autocommit=1) With autocommit set to 1, my program properly reads and updates the table. I am trying to use commit and rollback by setting autocommit to false (set session autocommit=0;) While executing rc = commit(Pswrd_hndl) I am getting the error "No Data". I am executing the following steps: 1] connect to database using odbc - odbc-handle 2] execute "set session autocommit=0;" using prepareSQL() and executeSQL() 3] Prepare "begin;" using prepareSQL() - begin-handle 4] Prepare "update USERS set paswrd = ..;" using prepareSQL() - pswrd-handle . . 5] accept the new password . . 6] execute "begin;" using executeSQL(begin-handle) 7] Set parameters for password update using bindParameter(pswrd-handle,..) 8] execute "update users set paswrd = ..;" using executeSQL(pswrd-handle) 9] if rc >= 0 commit the transaction using commit(pswrd-handle) At step 9, I am encountering this error "No Data". The parameter for commit is "atom handle", I assumed it will be the statement handle used for executing update statement. I removed the "begin;" part and executed the code but ended up with same result. Please advice. Regards, Rad.