Skip to Content.
Sympa Menu

freetds - Re: [freetds] Transactions

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Peter Deacon <peterd AT iea-software.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Transactions
  • Date: Wed, 14 May 2003 10:09:17 -0700 (Pacific Daylight Time)

On Wed, 14 May 2003, John Anderson wrote:

> On Wed, 2003-05-14 at 07:38, Frediano Ziglio wrote:
> > Il mar, 2003-05-13 alle 23:09, John Anderson ha scritto:
> > > On Tue, 2003-05-13 at 22:35, Frediano Ziglio wrote:
> > > > Did you use SQL_HANDLE_ENV or SQL_HANDLE_DBC ??

> > > SQL_HANDLE_DBC. The code I'm using runs correctly with the postgres odbc
> > > driver, and with the EasySoft ODBC-ODBC bridge to a SQL Server 2000
> > > server.

> > Strange. Can you post a snipped of the code ?

> Very strange. I had a look at the internals of SQLEndTran and it looked
> OK to me. So I'm really baffled as to where exactly the error it.

> #ifdef USE_SQL_TRANSACT
> _connection.result() = ::SQLTransact (
> 0
> , _connection.handle()
> , type
> );
> #else
> // this gives and invalid handle error with FreeTDS
> _connection.result() = ::SQLEndTran (
> _connection.handleType()
> , _connection.handle()
> , type
> );
> #endif

> where _connection.handle() returns the SQLHANDLE value,
> _connection.handleType() is a method that returns SQL_HANDLE_DBC, and
> type is a parameter which will be either SQL_COMMIT or SQL_ROLLBACK.

> Maybe I should just do a debug build of freetds and breakpoint
> SQLEndTran to see what it does. Although that might be tricky given that
> the driver manager loads the library?

On the win32 platform using vc++ I can step from my application
into the driver code.

>From what I can tell most unix platforms work the same way... as long as
the driver is physically loaded into the processess address space you
should be able to set breakpoints...etc in the driver itself.

Have Fun!
Peter




Archive powered by MHonArc 2.6.24.

Top of Page