I put copies of .odbc.ini into the ~/ of the user that runs the script. (i.e. - there is a copy in nobody's ~/ if you're running from a web server where nobody is the User)
You must have a copy of udbc.ini in /etc or else it doesn't work. I need to complain to Netrista that the free version from iodbc.org doesn't contain a copy of that.
You must set $ENV{ODBCHOME} to the location of Openlink. This is not the lib directory but the parent Openlink directory.
If you don't define your DBI_DSN, DBI_USER, or DBI_PASS environment variables, you can provide that information on the connect string.
DBI->connect('dbi:ODBC:dsn', 'user', 'pass', {...});
If you're having problems with large strings coming from the database, turn on LongTruncOk in the DBI arguments (i.e. - {LongTruncOk => 1}).
Some general rules about the DBI. Use RaiseError during debug mode. It is great. Use a trace level of 3 if RaiseError is not helpful enough. Before DBI->connect: DBI->trace(3); Get a copy of the cheetah (Programming the Perl DBI).
Good luck, and have fun. :)
Update: Forgot to mention about your $ENV{DBI_DSN} = 'path'. That's not right.
$ENV{DBI_DSN} = 'dbi:ODBC:dsn'; $ENV{DBI_USER} = 'user'; $ENV{DBI_PASS} = 'pass'; $ENV{ODBCHOME} = '/usr/local/openlink';
That will get you further. :)
ALL HAIL BRAK!!!
In reply to Re: $ENV question
by PsychoSpunk
in thread $ENV question
by radagast
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |