Sorry. I meant to say Leopard, not Ubuntu.

I am running a test script that lists the drivers and then connects to list the 
tables. I get this:

$ perl testdbi.pl

Driver: DBM
Driver: ExampleP
Driver: File
Driver: Gofer
Driver: ODBC
Driver: Proxy
Driver: Sponge

DBI connect('Driver={SQL 
Server};Server=database.domain.com;Database=MyDB','readonly',...) failed: 
[iODBC][Driver Manager]Specified driver could not be loaded (SQL-IM003) [state 
was IM003 now 00000]
[iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-00000) at 
testdbi.pl line 14
Can't connect to DBI:ODBC:Driver={SQL 
Server};Server=database.domain.com;Database=MyDB: [iODBC][Driver 
Manager]Specified driver could not be loaded (SQL-IM003) [state was IM003 now 
00000]
[iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-00000) at 
testdbi.pl line 14.

Thanks,
David

From: Jonathan Leffler [mailto:jonathan.leff...@gmail.com]
Sent: Tuesday, May 03, 2011 10:27 AM
To: Stiff, David; dbi-users@perl.org
Subject: Re: (Fwd) Perl DBI on Mac OS X (or Ubuntu?)


On Mon, May 2, 2011 at 19:47, Tim Bunce 
<tim.bu...@pobox.com<mailto:tim.bu...@pobox.com>> wrote:
----- Forwarded message from 
david_st...@mcafee.com<mailto:david_st...@mcafee.com> -----

Date: Mon, 2 May 2011 18:40:11 -0700
From: david_st...@mcafee.com<mailto:david_st...@mcafee.com>
To: tim.bu...@pobox.com<mailto:tim.bu...@pobox.com>
Subject: Perl DBI on Mac OS X

  [...] I am new to Perl DBI. I have it working fine on my Windows 7 box.

  I have installed the module on Ubuntu and tried running the same test script 
but get a connection error:

Your subject line says 'MacOS X'; your comment here says 'Ubuntu'.  AFAIK, 
those are not synonyms.

Which platform are you actually having the problems on?

  DBI connect('Driver={SQL Server};Server=[dsn];Database=[db]','[pwd]',...) 
failed: [iODBC][Driver
  Manager]Specified driver could not be loaded (SQL-IM003) [state was IM003 now 
00000]

  [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-00000) 
at testDBI.pl line 14

  Can't connect to DBI:ODBC:Driver={SQL Server};Server=[dsn];Database=[db]: 
[iODBC][Driver
  Manager]Specified driver could not be loaded (SQL-IM003) [state was IM003 now 
00000]

  [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (SQL-00000) 
at testDBI.pl line 14.

  Do I need to install another module? Or configure ODBC?


Can you write a pure ODBC program that connects to your database?  If so, what 
DSN do you use to connect?
If not, concentrate on configuring ODBC correctly.  Do you have an ODBC driver 
for your DBMS installed?

Is your DBMS running on your Ubuntu (MacOS X) box or out on a Windows box?


--
Jonathan Leffler 
<jonathan.leff...@gmail.com<mailto:jonathan.leff...@gmail.com>>  #include 
<disclaimer.h>
Guardian of DBD::Informix - v2008.0513 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be 
amused."

Reply via email to