Re: some ct_options / ct_diag questions

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <OF10E78889.BDC55E29-ONC1257522.0050720A-C1257522.0051782D@asset-control.com>
James,
Follow-up question: is the CT-library part of freetds supposed to exhibit 
exactly the same behaviour as the standard Sybase CT-lib? (for the stuff 
that it implements).
I presume the answer to be yes and I am asking this because I found a 
subtle difference between the two.
Say you use ct_dynamic() to prepare and execute a (parametrized) insert 
statement that generates a duplicate key violation.
With Sybase CT-lib (15.0) this results in 3 messages being set to your 
app, 2 server messages: 2601 ("duplicate key") and 3621 ("command 
aborted") 
and a client message (16842830, "no rows affected").
With freetds you only get the 2 server messages.
Another difference (not unlikely to be related to the above): if in the 
subsequent results processing loop you execute
a ct_res_info(...CS_ROW_COUNT...), Sybase CT-lib reports a row count of 0 
and freetds CT-lib a row count of -1 (CS_NO_COUNT).
Before I dive into the freetds ctlib and/or tds sources, do you have a 
quick thought on why this happens?
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.