[freetds] Transactions

John Anderson ardour at semiosix.com
Wed May 14 05:15:32 EDT 2003

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.

	_connection.result() = ::SQLTransact (
		, _connection.handle()
		, type
	// this gives and invalid handle error with FreeTDS
	_connection.result() = ::SQLEndTran (
		, _connection.handle()
		, type

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?


More information about the FreeTDS mailing list