Re: MS Sql 2005 and prepared queries

Royce Smallbone <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
> 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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.