venimfrogtongue has asked for the wisdom of the Perl Monks concerning the following question:

Please don't think of this as a stupid question because I really need to know the answer. I had a script developed for me in the past which requires ODBC. And from I was told from many webhosts is ODBC is only offered on WIN servers, no unix. The problem is, most webhosts I come across, which I can afford, is unix meaning I cannot use the script.

Does anyone know if it is possible to somehow use a perl module which will perform the ODBC tasks even on a linux server? If so, which one(s)?

Thanks MILLION!

sulfericacid

Replies are listed 'Best First'.
Re: ODBC/Mods
by gellyfish (Monsignor) on Mar 29, 2002 at 18:16 UTC

    Does the program use DBD::ODBC or Win32::ODBC - if the former it will be as simple as changing the 'connect string' , if the latter you will almost certainly have to rewrite the whole thing. Having said that if you have libodbc on your Unix machine and your database is ODBC compatible (Informix, Oracle and PostgresSQL definitely are but there are probably others) then DBD::ODBC may work but it is probably not worth the extra overhead if there is a DBI driver for your database.

    /J\

Re: ODBC/Mods
by growlf (Pilgrim) on Mar 29, 2002 at 20:14 UTC

    Yes ODBC is available - but due to some security concerns with how it handles passwords, it is not often installed on production boxes. In FreeBSD for instance it is in the "ports" collection as a standard add-on that you can choose to install at any time. The same is true in Linux, and I understand even on Solaris.

    If ODBC is installed on the operating system, then you should be able to use the DBI to access it with the DBD::ODBC module.

    If it is not installed, you may want to look here or here for how to install and get the drivers on a Linux box.



    *G*