Re: Lack of SQLDescribeParam() support causes problems with PHP compiled with unixODBC
Igor Korot <[email protected]> Fri, 20 Jul 2018 15:14:25 -0500
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <CA+FnnTzPSdSLaJn4oUYrh9K7L2nDvjN2BOS7PCBque9WRghvyg@mail.gmail.com> |
Hi, On Mon, Jul 16, 2018 at 3:19 PM, Mike Jetzer <[email protected]> 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 > [email protected] > https://lists.ibiblio.org/mailman/listinfo/freetds