[unixODBC-support] Red Hat/MSSQL/PHP odbc_execute parameter binding problem...
Edward Berwick
eberwick at gmail.com
Thu Jan 22 13:52:55 GMT 2009
Hi Marcus,
I'm no expert on this (still having problem with it myself) but you can
download unixODBC from
www.unixODBC.org
that error looks nasty, good luck solving your problem.
Cheers, Ed
2009/1/22 Lorenz, Marcus <Marcus.Lorenz at unilever.com>
> Hello everybody,
>
> i have a problem with the odbc_exec function in PHP and i hope i have
> addressed the right component in the execution chain of this function for my
> problem. If not please let me know.
>
> First our environment:
> - Red Hat Enterprise Server 5.2
> - unixODBC (Version ? How can i get that)
> - FreeTDS stable version available at the 16.12.2008
> - MsSQL Server 2005 Enterprise 64Bit.
> - PHP ADO DB
>
> The problem is, that i can't execute any statements using parameter
> bindings together with odb_execute. If i include the parameters into the
> query directly i get the expected results. If i pass them to odbc_execute as
> an array i only get the following error:
>
> odbc_mssql error: [00000: ° ±ÿÂ] in EXECUTE("select top 1 * from
> master.Importstatus WHERE importer=? order by id desc")
>
> The odbc_prepare() before is executed successfully and returns a valid
> statement resource.
>
> The id 00000 normaly means that the query could be executed successfully
> (then why is it issuing this error?).
>
> This is (a part of) the freetds.config:
> [global]
> # TDS protocol version
> tds version = 8.0
>
> This is (a part of) the odbc.ini:
>
> [ODBC Data Sources]
>
> [Default]
> Driver = /usr/local/freetds/lib/libtdsodbc.so
> ....
>
> [MSSQL_Server]
> Driver = FreeTDS
>
> I'm developing the same application under my own windows (i have to use
> it...) environment using the win32 odbc library and everything works fine.
> When i copy it to the enterprise server using linux i get the descibed
> error.
>
> So any help would be greatly appreciated.
>
> Thank you very much.
>
> Marcus Lorenz.
>
> _______________________________________________
> unixODBC-support mailing list
> unixODBC-support at mailman.unixodbc.org
> http://mailman.unixodbc.org/mailman/listinfo/unixodbc-support
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.unixodbc.org/pipermail/unixodbc-support/attachments/20090122/cc7a7035/attachment.html>
More information about the unixODBC-support
mailing list