in reply to Re^2: Problems with DBD::ODBC and DBD::Sybase
in thread Problems with DBD::ODBC and DBD::Sybase

I see you have also posted to the FreeTDS list - that is a good idea. The fact that you can run iodbc-config shows you do have the iODBC driver manager installed. The --odbcinstini argument is telling you which file to add your drivers to. If the file does not exist, create it. Similarly with the odbc.ini file.

iodbctest is the command line app you can use to test your dsns are working. iodbctestw is a unicode aware version of the same app.

You need to go ahead and create your odbcinst.ini and odbc.ini files based on my previous comments and the help on the freetds web site detailing what to put in them. But bare in mind the freetds site instructions are probably for the unixODBC driver manager and iODBC (the driver manager you are using) is slightly different in the way you name driver and data sources - see my previous reply.

I'm no expert OSX person but if you get no joy from the freetds list I might be able to help further.

  • Comment on Re^3: Problems with DBD::ODBC and DBD::Sybase

Replies are listed 'Best First'.
Re^4: Problems with DBD::ODBC and DBD::Sybase
by rwitmer (Initiate) on May 29, 2009 at 18:08 UTC
    Okay, here's the answer:

    Like the previous commenter said, to get Sybase to install you have to read the suggestion here:

    http://www.mail-archive.com/dbi-users@perl.org/msg31071.html

    Those symbols are missing from the FreeTDS include files.

    Edit dbdimp.c, and somewhere near the top add:

    #define BLK_VERSION_150 BLK_VERSION_100 #define BLK_VERSION_125 BLK_VERSION_100 #define BLK_VERSION_120 BLK_VERSION_100

    Then recompile.

    Also, do not try testing using the scripts here: http://www.freetds.org/userguide/perl.htm#DBD.SYBASE

    Because there is no Sybase public server since about 10 years ago, apparently. Definitely not now.

    Also, you have to remember that if something freezes up and you get irritated and shut down your machine, when you turn it back on you have to reset your SYBASE environment variable or it will not find the driver that freetds comes with. Doh.

    Thanks for all your help! I definitely understand the way it works much better now that I looked at it really closely at the least.