Lack of SQLDescribeParam() support causes problems with PHP compiled with unixODBC

Mike Jetzer <[email protected]> Mon, 16 Jul 2018 15:19:59 -0500
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CANm2B1k5S0Oj4+qTaD-W9Jchq7g3nAum7yoqCtWj1kFTmBhAmw@mail.gmail.com>
I've compiled PHP 5.6.30 with unixODBC-2.3.5 support but am receiving the
following error when attempting to odbc_prepare():

Warning: odbc_prepare(): SQL error: [unixODBC][Driver Manager]Driver does
not support this function, SQL state IM001 in SQLDescribeParameter


http://www.freetds.org/userguide/php.htm seems to indicate that "everything
should run" after compiling PHP with support for ODBC.

Google search results (https://bugs.php.net/bug.php?id=54343) indicate that
PHP 5.3.3 and prior did not test the return value of SQLDescribeParam(),
but newer versions do and thus fail.  I downloaded the current version of
PHP (php-7.2.7), which also tests the return value of SQLDescribeParam().

I checked the FreeTDS mailing list archives.  It seems that
SQLDescribeParam() hasn't been discussed much since around 2012.

Is there any current or planned work for supporting SQLDescribeParam()?

I assume that FreeTDS doesn't currently support this because it's difficult
to implement, but can anyone provide an overview of what would be necessary
to add support?

Thanks!