Sharon,

The string after "ODBC:" is usually a DSN name as in:

DBI->connect("dbi:ODBC:mydsn",...)

or

DBI->connect("dbi:ODBC:DSN=mydsn")

where mydsn is an entry in your unixODBC odbc.ini file defining host, port,
dbname e.g.

[mydsn]
driver = freetds
host = something.something.something
port = 1521
dbname = name

If you want to use DSN-less connections then you'll need to start with
DRIVER=freetds or whatever. Note, you should have a freetds entry in
odbcinst.ini also.

You can find your user and system odbc.ini files with odbcinst -j.

Perhaps

http://www.easysoft.com/products/9999/documentation/perl_tutorials/dbd_odbc_tuto
rial1.html

and

http://www.easysoft.com/products/9999/documentation/perl_tutorials/dbd_odbc_tuto
rial3.html

might help explain as they contain alot about unixODBC, DSNs etc.

Martin

On 01-Jun-2005 Smith, Sharon Michelle (OSLO) wrote:
> Hi,
>  
> I'm trying to debug an install for my DBD::ODBC module, and since this
> is my first experiment with the DBI, I have a question on format/syntax.
> But first, here's some background info that may/not help:
>  
> Environment is Linux
> I've already installed/tested Perl5, DBI, unixODBC (manager)
> Now, I'm trying to install the ODBC driver
>  
> In order to install the ODBC driver, environment variables:
> DBI_DSN, DBI_USER, DBI_PASS, ODBCHOME, LD_LIBRARY_PATH, and LANG
> all had to be added to .bashrc
>  
> I'm installing the DBD::ODBC module from CPAN.  It comes with a series
> of connectivity tests that you can run after running 'make' by doing
> 'make test'.  I'm trying to narrow down my list of things that could be
> wrong.  Almost all of the errors seem to be complaining about my 'DSN
> not found or my driver not specified'.  Can someone tell me if the
> following syntax is ok or if any other major no-no's jump out at you?  
>  
> export
> DBI_DSN='dbi:ODBC:host=something.something.something;port=1521;dbname=na
> me'
>  
> I'm very new to all this and would appreciate as much detailed help as
> possible.  Thanks for any info....
>  
>  

--
Martin J. Evans
Easysoft Ltd, UK
Development

Reply via email to