[freetds] freetds with QT 4.3 transaction support

Ying He yhe at devonit.com
Fri Oct 19 13:43:18 EDT 2007


Hi, 
I was using freetds's tds driver not odbc driver. Now I am trying again
with freetds's odbc driver. The connection is opened successfully but I
get a bunch of the the following:

qGetStringData: Error while fetching data (-1)
qGetStringData: Error while fetching data (-1)

I don't see anything showing error in TDSDUMP
Any idea what is going wrong?

best,
Ying

-----Original Message-----
From: freetds-bounces at lists.ibiblio.org
[mailto:freetds-bounces at lists.ibiblio.org] On Behalf Of James K. Lowden
Sent: Thursday, October 18, 2007 7:45 PM
To: FreeTDS Development Group
Subject: Re: [freetds] freetds with QT 4.3 transaction support

Ying He wrote:
> I am able to use QT 4.3 QTDS and freetds to connect to a MS SQL server
> and be able to do insert/update/delete/select. However, for some
reason,
> transactions are not supported. 

What do you mean by "not supported"?  SQLEndTran() is supported and the
unit test (src/odbc/unittests/transaction.c) passes.  

> I try to use QT 's QSqlDriver's hasFeature method to test and it shows
> the driver does not support transaction. 

One thing you might do is get a TDSDUMP log to see what ODBC functions
are
called by that method and maybe how it's deciding.  

> anybody has any idea to work around this issue?

1.  Fix our ODBC driver to report correctly (or to add a feature) if
need
be. 
2.  Fix Qt's function, if broken. 
3.  Ignore feature test and just use the function anyway, if possible. 
4.  Use T-SQL BEGIN TRAN, ROLLBACK, and COMMIT instead of ODBC
abstractions.  

HTH.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds




More information about the FreeTDS mailing list