ActiveState Community

DBD:ODBC + ActivePerl

Posted by lurcher on 2008-06-18 05:20

Hi,

I have been looking at a problem one ouf our customers was having using ActivePerl to connect via DBD:ODBC to our SQL Server driver on Linux. After investigating, the problem seems to be that the version of iODBC you have built your distribution with expects the W (wide) functions (SQLDriverConnectW, SQLConnectW) to use four byte unicode. Unfortunatly that will fail with just about every ODBC driver out there that exports the W functions, as most of those will expect 2 byte wide characters, just the same as on Windows

Even though DBD:ODBC doesn't normally call the W function, iODBC notices that the driver exports the functions and calls it, so there is no simple fix for many drivers.

Its a simple enough fix, just rebuild and install a new copy of DBD:ODBC using unixODBC, or if you like, iODBC built to expect wide (two byte) characters to the wide functions.

I just wondered if the current action of expecting four bytes was a explicit decision by the folk who build the ActivePerl distributions, or just unintended behavior that was included whithout noticing?

Thanks.

--
Nick Gorham
Easysoft and unixODBC
http://www.easysoft.com http://www.unixodbc.org

andrew2404 | Wed, 2008-09-17 07:57

I have a perl app that happily retrieves from a MS-SQL database when run on the command line. However, when I run it from a web browser nothing is displayed. It fails to connect to the database

It must be due to the browser not running as "my user" and running as the "web user", which does not have permission to connect. Where can I check this?

I feel that I'm really close. HELP:>

Many thanks in advance.