Re: Prepared statements with no parametersexhibit strangebehaviour

"ZIGLIO, Frediano, VF-IT" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
> 
> On Fri, Aug 22, 2008 at 08:49:59AM +0200, ZIGLIO, Frediano, 
> VF-IT wrote:
> > 
> > Applied modified versions of the patches. 
> tds_query_flush_packet was really wrong in
> > tds_send_emulated_execute!
> > I noted however that probably you are using wrong protocol 
> version. ODBC should use this
> > function only on Sybase with some text fields or using a 
> former protocol (4.2). Currently
> > you should use protocol version 5.0 for Sybase, 8.0 for 
> mssql2k and 7.0 for mssql < 2k.
> 
> I noticed that FreeTDS was using protocol 4.2 when I was 
> debugging all of this
> (the prepared statements weren't really prepared and were 
> sent to the server
> every time) but I didn't want to confuse matters by including 
> this in the
> other message. My task for today was going to be figuring out 
> *why* it was
> using protocol 4.2 (this is an MS SQL server). I don't know any way of
> changing this using ODBC calls, so what is the correct way of 
> selecting the
> protocol version when using ODBC?
> 
> Cheers,
>     Chris

You can 
- configure all FreeTDS to use another version by default
- use TDS_Version option in odbc.ini (see
http://www.freetds.org/userguide/odbcconnattr.htm)
- use TDS_Version option using SQLDriverConnect
- use combined configuration and specify "tds version" option (see
http://www.freetds.org/userguide/freetdsconf.htm)

freddy77

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
smime.p7s (application/x-pkcs7-signature, 3.1 KB) - not displayed
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.