freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] SQL_ERROR from SQLColAttribute
- Date: Wed, 7 Oct 2020 11:41:45 +0100
Il giorno mer 7 ott 2020 alle ore 02:15 Bruce Seely <bseely AT stsci.edu> ha
scritto:
> Howdy,
>
> Our Lisp vendor's ODBC interface stopped working with the FreeTDS 1.0
> release.
>
> I am trying to isolate the problem, and have a test case to show how it
> fails.
>
> The test function performs these operations:
>
> - connect to R2D2 as bseely
> - SQLExecDirect "use pps_lrp_dev_14_11"
> - SQLExecDirect "select * from ppsdb_version"
> - SQLNumResultCols
> - SQLColAttribute for col #1, SQL_DESC_NAME
> - SQLGetDiagRec
>
>
> SQLExecDirect correctly accesses the database.
>
> The call to SQLColAttribute is returning SQL_ERROR.
>
> The call to SQLGetDiagRec reports that there is nothing to report.
>
> I have attached a combined ODBC log & TDS_DUMP log.
>
>
The log is pretty clear, driver SQLColAttribute is just not called.
Which DM is Lisp code using?
Can you check which APIs libtdsodbc.so.XXX is exporting? In my Linux
machine a command like
objdump -T libtdsodbc.so.0.0.0 | grep SQLColAttribute
is needed. Other OSes use the "nm" command. In my system I'm getting this
output
00000000000166f0 g DF .text 0000000000000092 Base
SQLColAttributeW
0000000000016630 g DF .text 0000000000000092 Base
SQLColAttributes
00000000000166d0 g DF .text 000000000000001e Base
SQLColAttribute
> The SQLColAttribute call that returns SQL_ERROR is on line 513
>
> There is an error on line 532 that I don't understand:
>
> error_export.h:83:SQLErrorW(0x0, 0x0, 0x7feee81007e0, 0x7ffee33c70a0,
> 0x7ffee33c7bd0, 0x7feeea002e00, 512, 0x7ffee33c8000)
>
>
Simply Lisp is trying to understand the error. Surprisingly SQLError is
deprecated
and it's odd is even called. That could sustain the fact that ODBCVER was
not defined.
It would be a bit inconsistent that the DM is calling wide functions but
not having ODBCVER
defined and bigger than 0x300 (ODBC 3.0).
> If I can provide anything else that would be useful, let me know.
>
>
> Any help or ideas would be greatly appreciated.
>
>
> Thanks,
>
> Bruce
>
>
One reason could be that ODBCVER is not defined by your system ODBC headers
so SQLColAttribute is not compiled.
Frediano
-
[freetds] SQL_ERROR from SQLColAttribute,
Bruce Seely, 10/06/2020
- Re: [freetds] SQL_ERROR from SQLColAttribute, Frediano Ziglio, 10/07/2020
Archive powered by MHonArc 2.6.24.