[prev in list] [next in list] [prev in thread] [next in thread]
List: mysql-odbc
Subject: RE:
From: Venu <venu () mysql ! com>
Date: 2001-10-25 20:16:54
[Download RAW message or body]
Hi !!!
> -----Original Message-----
> From: walterio wiedmann [mailto:wwalterio@yahoo.com.ar]
> Sent: Thursday, October 25, 2001 1:04 PM
> To: Venu Anuganti
> Subject:
>
>
> Hi
>
> After this time, i have change my machine and try
> again to
> execute Centura with MyODBC 2.50.39 version
> following your comments about this 2 flags and all
> ok.
Great..!!
>
> My question now is how can i setup this driver to
> work
> with transaction-safe tables, because i will
> commit the
> transaction when all is ok, i probe with the
> sentence
>
> * ----------------------------------
> set autocommit off;
> update localidad
> set cod_localidad='004'
> where id_localidad=1;
> rollback;
> * ----------------------------------
> but the data cod_localidad whas commited.
Some thing like this should work:
/* set autocommit to OFF */
SQLSetConnectOption(ConnectionHandle,SQL_AUTOCOMMIT,SQL_AUTOCOMMIT_OFF);
SQLExecDirect(StatementHandle,"update localidad set cod_localidad='004' where
id_localidad=1", SQL_NTS);
/* rollback the work now...*/
SQLTransact(NULL, hdbc, SQL_ROLLBACK);
Hope this helps you
Regards, venu
--
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu <venu@mysql.com>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.com
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail myodbc-thread4060@lists.mysql.com
To unsubscribe, send a message to the address shown in the
List-Unsubscribe header of this message. If you cannot see it,
e-mail myodbc-unsubscribe@lists.mysql.com instead.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic