Skip to Content.
Sympa Menu

freetds - Re: [freetds] tds version = 7.1 causes dbbind to find for me

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Norm Lastovica <lastovica AT sciinc.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] tds version = 7.1 causes dbbind to find for me
  • Date: Tue, 4 Oct 2016 12:52:27 +0000

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' <freetds AT lists.ibiblio.org>
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>





Archive powered by MHonArc 2.6.24.

Top of Page