On Thu, Jul 29, 2010 at 6:05 PM, Andrew Farnsworth <[email protected]>wrote:

> On Thu, Jul 29, 2010 at 5:13 PM, Paul Boniol <[email protected]>wrote:
>
>> Basically I'm up to configuring ODBC on Linux now.  (Perl I've had working
>> with error messages on all connect/prepare/execute/etc. calls for a few
>> years.)
>>
>> FreeTDS (on Linux) is connecting and executing queries just fine.
>>
>> It appears to be some problem with unixODBC remembering (or thinking
>> about) DSN's that I've told it about.  (The behavior is like changing a
>> config file but not rebooting a service, so it's still operating under the
>> previous config.  But I've even rebooted Linux, so that's not it.)
>>
>> I've double checked my spelling of everything.  I've done user DSN's,
>> system DSN's, manual config, tool config.  I haven't tried setting up "ODBC
>> only" config, but that's what I'm trying next.
>>
>
> Paul,
>   You might also try passing the full connect information in Perl rather
> than trying to rely on the ODBC subsystem to supply it.  I know it is better
> the other way but at least this would be a good test.
>
> Andy
>

use DBI;
use DBD::ODBC;

my $dbh = DBI->connect ('DBI:ODBC:driver={SQL Server};server=
myserver.vanderbilt.edu;database=mydatabase;port=1433;', 'myuser', 'mypwd')
or die $DBI::errstr;

This works on Windows, without a DSN for mydatabase, so I know it works on
Windows, without binding to a Windows DSN and no bad pwd or the like.

s/SQL Server/FreeTDS/ and try it on Linux yields:

DBI connect('driver={FreeTDS};server=myserver.vanderbilt.edu
;database=mydatabase;port=1433;','myuser',...)
failed:
[iODBC][Driver Manager]Specified driver could not be loaded (SQL-IM003)
[state was IM003 now 00000]
[iODBC][Driver Manager]{FreeTDS}: cannot open shared object file: No such
file or directory (SQL-00000) at Test.pl line 6

So I thought something might be having problems with pointing at a linked
file, so I pointed the driver at the actual file.  Still the same results.
 Tried it as root with the same results.

The .so file is there.  The perms on the file are -rwxr-xr-x.  I'm at a
loss.

Just curious.  I haven't compiled from source for a while, but I followed
the instructions and all seemed to go well.  Is there something like ld that
I need to do to tell Linux the libraries are there, even if I point to the
file?  I would have thought something like that would have been taken care
of by the make install, but it's been too long.

---Paul.

-- 
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en

Reply via email to