Re: tds version = 7.1 causes dbbind to find for me
Norm Lastovica <[email protected]> Tue, 4 Oct 2016 12:52:27 +0000
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <BY1PR11MB0485CC072E9113D7255C7D65D0C50@BY1PR11MB0485.namprd11.prod.outlook.com> |
After reviewing the TDS log file, I came to the conclusion that the issue was related to the size of the resultant buffer (tt in the example). It is 8000 or more with 7.1 and later as the version. I've increased this buffer size to 8192 and that seems to have addressed the problem. From: Norm Lastovica Sent: 2016-10-04, Tuesday 06:27 To: 'FreeTDS Development Group' <[email protected]> Subject: tds version = 7.1 causes dbbind to find for me OpenVMS IA64 V8.4. FREETDS-1_00_15. SQL Server 2014 - 12.0.4213.0. When tds version = 7.0, everything is good. But when I set to 7.1 or later, dbbind fails with (TDS Msg 20033, Level 7, "User attempted a dbbind with mismatched column and variable types"). My sequence code is approximately this: char tt[128] = {0}; strcpy (command_string, "SELECT SERVERPROPERTY ('productversion')"); EXECUTE_CHECK_ERC (dbcmd (dbproc, command_string), "dbcmd", (char*)command_string); EXECUTE_CHECK_ERC (dbsqlsend (dbproc), "dbsqlsend", (char*)command_string); EXECUTE_CHECK_ERC (dbsqlok (dbproc), "dbsqlok", (char*)command_string); while ((erc = dbresults (dbproc)) != NO_MORE_RESULTS) { CHECK_ERC ("dbresults", command_string); EXECUTE_CHECK_ERC (dbbind (dbproc, 1, NTBSTRINGBIND, sizeof(tt), (BYTE *) &tt), "dbbind", command_string); } Is tds version 7.1 something that should be expected to work? Norman Lastovica / SCI / +1.603.879.9022 x135 / www.sciinc.com<http://www.sciinc.com>