Skip to Content.
Sympa Menu

freetds - Re: [freetds] Lack of SQLDescribeParam() support causes problems with PHP compiled with unixODBC

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Igor Korot <ikorot01 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>, Mike Jetzer <mjetzer.cdc AT gmail.com>
  • Subject: Re: [freetds] Lack of SQLDescribeParam() support causes problems with PHP compiled with unixODBC
  • Date: Fri, 20 Jul 2018 15:14:25 -0500

Hi,

On Mon, Jul 16, 2018 at 3:19 PM, Mike Jetzer <mjetzer.cdc AT gmail.com> wrote:
> 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.

Google found this:

https://github.com/FreeTDS/freetds/issues/104

with the response from Frediano stating that its just hard to implement
(needs query parsing). I presume he is talking about building the query
close to this:
https://stackoverflow.com/questions/13405572/sql-statement-to-get-column-type
and getting the results from running it.

There also some discussions that you should set the TDS_Version properly.
Just google freetds sqldescribeparam.

Thank you.

>
> 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!
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> https://lists.ibiblio.org/mailman/listinfo/freetds




Archive powered by MHonArc 2.6.24.

Top of Page