Skip to Content.
Sympa Menu

freetds - Re: [freetds] MS Sql 2005 and prepared queries

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Royce Smallbone <royce.smallbone AT laneend.net>
  • To: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] MS Sql 2005 and prepared queries
  • Date: Thu, 17 Jul 2008 20:28:51 +0100

> Royce Smallbone wrote:
> > latest stable version of FreeTDS.
>
> I assume you mean 0.82.
>
> > I have been writing a program
> > using Qt4 in windows and am porting across to Linux, it makes
> > extensive use of prepared queries.
> >
> > I can't seem to get these to execute under FreeTDS, is this supported
> > yet?
>
> Yes.
>
> > I get am getting the following errors in my odbc log:
> >
> > [[FreeTDS][SQL Server]Invalid data type]
>
> Perhaps your parameter binding is wrong.
>
> You need more detailed information. You can use TDSDUMP to log the
> session, and examine the log for error messages coming back from the
> server. If it's strictly a client-side error, it will also show where in
> the ODBC library the error originates.
>
> HTH.
>
> --jkl

Here is the last part of the TDSDUMP that I think details the error, I am
afraid that I don't understand it.

token.c:2217:tds_process_end() state set to TDS_IDLE
util.c:162:Changed query state from READING to IDLE
token.c:2232: rows_affected = 0
util.c:110:logic error: cannot change query state from IDLE to PENDING
token.c:495:tds_process_tokens(0x811b4d8, 0xbf932818, 0xbf932814, 0x104)
token.c:498:tds_process_tokens() state is COMPLETED
odbc.c:1224:SQLBindParameter(0x812ba20, 1, 1, -8, -9, 22, 0, 0x811e69a, 22,
0xbf932834)
odbc.c:1125:_SQLBindParameter(0x812ba20, 1, 1, -8, -9, 22, 0, 0x811e69a, 22,
0xbf932834)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 1, 0xbf932146, 0xbf932154,
0xbf932378,
512, 0xbf932150)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 1, 0xbf932146, 0xbf932154,
0xbf932378, 512, 0xbf932150)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 2, 0xbf932146, 0xbf932154,
0xbf932378,
512, 0xbf932150)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 2, 0xbf932146, 0xbf932154,
0xbf932378, 512, 0xbf932150)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93266a, 0xbf932674,
0xbf932469,
512, 0xbf93267a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93266a, 0xbf932674,
0xbf932469, 512, 0xbf93267a)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93266a, 0xbf932674,
0xbf932469,
512, 0xbf93267a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93266a, 0xbf932674,
0xbf932469, 512, 0xbf93267a)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 2, 0xbf93266a, 0xbf932674,
0xbf932469,
512, 0xbf93267a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 2, 0xbf93266a, 0xbf932674,
0xbf932469, 512, 0xbf93267a)
error.c:609:SQLGetDiagRec(2, 0x81a1b58, 1, 0xbf93266a, 0xbf932674,
0xbf932469,
512, 0xbf93267a)
error.c:510:_SQLGetDiagRec(2, 0x81a1b58, 1, 0xbf93266a, 0xbf932674,
0xbf932469, 512, 0xbf93267a)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93261a, 0xbf932624,
0xbf932419,
512, 0xbf93262a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93261a, 0xbf932624,
0xbf932419, 512, 0xbf93262a)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93261a, 0xbf932624,
0xbf932419,
512, 0xbf93262a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 1, 0xbf93261a, 0xbf932624,
0xbf932419, 512, 0xbf93262a)
error.c:609:SQLGetDiagRec(3, 0x812ba20, 2, 0xbf93261a, 0xbf932624,
0xbf932419,
512, 0xbf93262a)
error.c:510:_SQLGetDiagRec(3, 0x812ba20, 2, 0xbf93261a, 0xbf932624,
0xbf932419, 512, 0xbf93262a)
error.c:609:SQLGetDiagRec(2, 0x81a1b58, 1, 0xbf93261a, 0xbf932624,
0xbf932419,
512, 0xbf93262a)
error.c:510:_SQLGetDiagRec(2, 0x81a1b58, 1, 0xbf93261a, 0xbf932624,
0xbf932419, 512, 0xbf93262a)





Archive powered by MHonArc 2.6.24.

Top of Page