[unixODBC-dev] Perl, DBI, DBD::ODBC and an ODBC Driver Manager

Roderick A. Anderson raanders at tsmg.us
Thu Jul 29 18:18:50 BST 2004


Martin J. Evans wrote:

>Untar DBD::ODBC and read the README.
>
>Build DBD::ODBC outside of CPAN:
>  
>
This was feeling like the trick I was going to try next.  I did the
environment variables before starting the Perl CPAN module but it
appears it didn't take...

>1. untar DBD::ODBC
>2. export ODBCHOME=/usr/local (I assume that is where you installed unixODBC)
>  
>

>3. export DBI_DSN='dbi:ODBC:mydsn'
>4. export DBI_USER=dbusername
>5. export DBI_PASS=dbpassword
>  
>

Are these three stored someplace or just used for the build/install?  I
will be using multiple databases so hardcoding could present a problem.

>6. perl Makefile.PL
>7. make
>8. make test
>9. su
>10. make install
>
>BTW, Your odbc.ini file looks very iODBC like. You don't need:
>
>  
>
Yeah it appears the (default RH?) install I tried several months ago may
have left some iODBC debris.

>>    [ODBC Data Sources]
>>    mydsn
>>    
>>
>
>  
>
Thanks Martin.  New and interesting things today!

>Martin
>--
>Martin J. Evans
>Easysoft Ltd, UK
>Development
>
>On 29-Jul-2004 Roderick A. Anderson wrote:
>  
>
>>Thanks to Nick I got unixODBC installed and I am able to connect to the
>>MS SQL Server using isql but when I try using the DBI in Perl I get an
>>error about needing DBD::ODBC.  No problem, I'm always forgetting to
>>install a module but in this case I can't get it to install.  Using perl
>>-MCPAN -e Shell I get most of the way through but it stops with not
>>being able to find an ODBC Driver Manager.  I'm sure I'm confused about
>>what a Driver Manager is so every permutation I tried failed.  I have
>>FreeTDS and unixODBC installed.
>>
>>    {~}# rpm -qa | egrep -i 'freetds|odbc'
>>    freetds-devel-0.62.1-1
>>    unixODBC-drivers-2.2.9-2sr
>>    unixODBC-devel-2.2.9-2sr
>>    unixODBC-2.2.9-2sr
>>    freetds-unixodbc-0.62.1-1
>>    freetds-0.62.1-1
>>    freetds-doc-0.62.1-1
>>    unixODBC-drivers-devel-2.2.9-2sr
>>
>>Are there additional packages I need?
>>
>>Pretty simplistic setups/ini files (that I don't think I've screwed up
>>too bad.)
>>
>>odbc.ini
>>    [ODBC Data Sources]
>>    mydsn
>>
>>    [mydsn]
>>    Driver          = FreeTDS
>>    Description     = Fun and Games
>>    Trace           = No
>>    ServerType      = unixodbc
>>    Server          = 1.2.3.4
>>    Database        = mydb
>>
>>    [Default]
>>    Driver          = FreeTDS
>>
>>odbcinst.ini
>>    [FreeTDS]
>>    Driver          = /usr/lib/libtdsodbc.so.0.0.0
>>
>>Once again all suggestions and pointers are appreciated.
>>
>>
>>Rod
>>
>>-- 
>>Roderick A. Anderson
>>Project Manager (aka. Dogsbody)
>>Technology Services Management Group
>><http://www.technologyservicesmanagementgroup.com/>
>>Spokane WA, 99202
>>
>>
>>---
>>[This E-mail scanned for viruses by Declude Virus]
>>
>>_______________________________________________
>>unixODBC-dev mailing list
>>unixODBC-dev at mail.easysoft.com
>>http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
>>    
>>
>
>_______________________________________________
>unixODBC-dev mailing list
>unixODBC-dev at mail.easysoft.com
>http://mail.easysoft.com/mailman/listinfo/unixodbc-dev
>---
>[This E-mail scanned for viruses by Declude Virus]
>
>  
>

-- 
Roderick A. Anderson
Project Manager
Technology Services Management Group <http://www.technologyservicesmanagementgroup.com/>
Spokane WA, 99202

---
[This E-mail scanned for viruses by Declude Virus]




More information about the unixODBC-dev mailing list