Re: Question about FreeTDS, DBD::ODBC and bind parameters with prepar ed statements
Frediano Ziglio <[email protected]>
| Newsgroups | gmane.comp.db.tds.freetds |
|---|---|
| Message-ID | <[email protected]> |
2009/5/5 James K. Lowden <[email protected]> > > [email protected] 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 _______________________________________________ FreeTDS mailing list [email protected] http://lists.ibiblio.org/mailman/listinfo/freetds