In C code, you'd just do something like this:
rcode = SQLSetConnectOption(m_hdbc, SQL_AUTOCOMMIT, 0);
CHECK_RCODE(SQL_HANDLE_DBC,m_hdbc,"SQLSetConnectionOption
SQL_AUTOCOMMIT");
I am not sure of the exact syntax for ADO, but MIcrosoft's web site
should have something about that. The only thing I can find talks
about ADO and ODBC not sup****ting nested transactions, so perhaps it's
not even possible.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach@[EMAIL PROTECTED]
Chicago: Pervasive Service & Sup****t Class - 03/2007 ***
Bill wrote:
> In the version 9 SQL Engine Reference the description of START
> TRANSACTION on page 203 states the following.
>
> "Within the ODBC standard, SQLSetConnectOption is used to specify
> whether each statement is in its own transaction or the application
> groups statements within a transaction.
>
> Each statement is in its own transaction if SQLSetConnectOption is
> called specifying the option SQL_AUTOCOMMIT and the value
> SQL_AUTOCOMMIT_ON (this is the default). This usage means that a
> transaction is started at the beginning of executing a statement and
> the transaction is either automatically committed, if no error occurs,
> or roled back, if error occurred, upon completion of statement
> execution.
>
> The application can group statements in a transaction if
> SQLSetConnectOption is called specifying the option SQL_AUTOCOMMIT and
> the value SQL_AUTOCOMMIT_OFF value."
>
> I cannot find any way to set the SQL_AUTOCOMMIT option using the ODBC
> data manager in Windows XP.
>
> I am connecting to Pervasive 9.5 using ADO and the Pervasive ODBC
> driver. I need to be able to start, commit and rollback transactions
> using the ADO connection commands. Can someone tell me how to
> configure the connection to allow this? Thanks.


|