freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] Question about FreeTDS, DBD::ODBC and bind parameters with prepar ed statements
- From: Frediano Ziglio <freddy77 AT gmail.com>
- To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Question about FreeTDS, DBD::ODBC and bind parameters with prepar ed statements
- Date: Tue, 5 May 2009 16:32:40 +0200
2009/5/5 James K. Lowden <jklowden AT freetds.org>
>
> Will.Saxon AT sage.com wrote:
> > If I try to prepare a statement containing placeholders for fields with
> > a binary datatype, I get the following error:
> >
> > DBD::ODBC::db prepare failed: [unixODBC][FreeTDS][SQL
> > Server]Statement(s) could not be prepared. (SQL-42000)
> > [unixODBC][FreeTDS][SQL Server]Implicit conversion from data type
> > varchar to binary is not allowed. Use the CONVERT function to run this
> > query. (SQL-22018)(DBD: st_prepare/SQLPrepare err=-1)
> >
> > The documentation for DBD::ODBC suggests that this can happen if the
> > driver does not support SQLDescribeParam. In these cases a default
> > parameter type of SQL_VARCHAR is used.
>
> $ grep SQLDescribeParam doc/api_status.txt
> odbc (all) SQLDescribeParam unimplemented
Yes, currently not implemented... it require sql parsing. Note however
that I used many time DBD::ODBC specifying parameters type before to
override default. Just use third bind_param argument
freddy77
-
Re: [freetds] Question about FreeTDS, DBD::ODBC and bind parameters with prepar ed statements,
James K. Lowden, 05/05/2009
- Re: [freetds] Question about FreeTDS, DBD::ODBC and bind parameters with prepar ed statements, Frediano Ziglio, 05/05/2009
Archive powered by MHonArc 2.6.24.