I am having trouble overwriting the default path where unixODBC database manager tries to look for the odbc.ini and odbcinst.ini for the list of data sources from which to connect to a database to.
I read in various docs that one could overwrite the default paths using the ODBCINI and ODBCSYSINI env variables.
I have .NET code calling a CGI script which in turn calls a perl script to access the database.
Some snippt of code is provided below :
CGI script making call to the setup.env file (exports necessary env variables) and the perl script
I am having trouble overwriting the default path where unixODBC database manager tries to look for the odbc.ini and odbcinst.ini for the list of data sources from which to connect to a database to.
I read in various docs that one could overwrite the default paths using the ODBCINI and ODBCSYSINI env variables.
I have .NET code calling a CGI script which in turn calls a perl script to access the database.
Some snippt of code is provided below :
CGI script making call to the setup.env file (exports necessary env variables) and the perl script
setup.env file which adds the two env variables to overwrite the data sources' path
The perl script tries to make a connection to the database using the perl DBI -> connect routine
Upon test, the code always fails when trying to connect to the database as it cant find the required data source.
ERROR: - DBI connect('NZSQL','scenario',…) failed: Server and/or port attributes are empty (SQL-HY000)
Would really appreciate anyone who could provide some pointers as to what I may be doing wrong !
There was a typo in the setup.env code snippet. ODBCSYSIN should be ODBCSYSINI