Hi,
I'm trying to call Virtuoso using ODBC from a Mac (ultimately this
will from Python but I'm trying to set up the ODBC stuff first). I'm
using the preinstalled iodbc (this is under Leopard) and I have
compiled Virtuoso on this machine as well, although I am trying to
connect to a remote instance, so have what I think are the ODBC drivers:
> ls /usr/local/virtuoso-opensource/lib/
jena virtodbc.so virtodbcu.solibvirtuoso-t.a virtodbc_r.a
virtodbcu_r.a
libvirtuoso-t.la virtodbc_r.la virtodbcu_r.la
sesame virtodbc_r.so virtodbcu_r.so
virtodbc.a virtodbcu.a virtuoso
virtodbc.la virtodbcu.la
So I set up my .odbc.ini thus:
[ODBC Data Sources]
Test DB = remote virtuoso
[Test DB]
Trace = Off
#TraceFile= stderr
Driver = /usr/local/virtuoso-opensource/lib/virtodbc.so
Description = Virtuoso 5.0.3
Host = remotehost.some.com
Port = 1111
Make sure that the ODBCINI environment variable is pointing to
my .odbc.ini and then test it:
>iodbctest
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.1211
Enter ODBC connect string (? shows list): ?
DSN | Driver
------------------------------------------------------------------------------
Test DB | remote virtuoso
Enter ODBC connect string (? shows list): DSN = Test DB
1: SQLDriverConnect = [iODBC][Driver Manager]Data source name not
found and no default driver specified. Driver could not be loaded (0)
SQLSTATE=IM002
1: ODBC_Connect = [iODBC][Driver Manager]Data source name not found
and no default driver specified. Driver could not be loaded (0)
SQLSTATE=IM002
Have a nice day.[
So am I using the wrong driver? How should I be doing this?
Cheers,
Matthew