Jorge,

Most of the drivers only support bind_param on those kind of types of
columns.  You have to treat these with special care.  I can say that because
I've done it in mysql and oracle, I guess DBD::ProxyServer is no exception.

Hope this helps,

Anton

-----Original Message-----
From: Jorge L. Allen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 30, 2001 6:27 AM
To: [EMAIL PROTECTED]
Subject: Binding Parameter



I was accessing an Access Database through a proxy server from unix.
It worked fine with selecting certain columns.
I was creating SQL on the fly like:

SELECT type FROM Documents WHERE foo=$bar

When i selected a memo type colunm (I set LongReadLen fine), it gave me
errors like this:
Error: Server returned error: Failed to execute method
CallMethod: DBD::ODBC::st execute failed: [Microsoft][ODBC Microsoft
Access Driver] Too few parameters. Expected
1. (SQL-07001)(DBD: st_execute/SQLExecute err=-1) at
D:/Perl/site/lib/DBI/ProxyServer.pm line 317.


Then, I bind the parameter instead of creating the sql statement on the
fly, and it worked. I looked at the code of the execute code in the proxy
server, and it deals with bind parameters. So I binded the parameter
assuming that execute was looking for a parameter. So I gave it to it.


And it worked, but I was wondering if someone out there knows the reason
of this. It is not a good learning experience if I just fixed it by magic.


Thanks a lot,


Jorge Allen

Reply via email to