Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Smalltalk)  »  ODBC in Linux...
Page 1 of 1    

ODBC in Linux...

Author Message
gargoyle47...
Posted: Wed Oct 14, 2009 4:51 pm
Guest
I have set up some ODBC DSNs in Ubuntu for connection to a postgres DB
via VW7.6.

When I try and run my app I get the message:
The ODBC CLI Driver is not correctly installed

I have loaded the packages ODBCEXDI and PostgreSQLEXDI
I can connect to the DB using the PostgreSQLEXDIConnection but not the
normal odbcConnection (I get the above message).
I have tried various connection strings, but get the same result.

This is all a bit vague I know, but any ideas?
 
jarober...
Posted: Wed Oct 14, 2009 6:27 pm
Guest
I think our ODBC support is Windows only

On Oct 14, 12:51 pm, gargoyle47 <gjdwebs... at (no spam) yahoo.co.uk> wrote:
Quote:
I have set up some ODBC DSNs in Ubuntu for connection to a postgres DB
via VW7.6.

When I try and run my app I get the message:
     The ODBC CLI Driver is not correctly installed

I have loaded the packages ODBCEXDI and PostgreSQLEXDI
I can connect to the DB using the PostgreSQLEXDIConnection but not the
normal odbcConnection (I get the above message).
I have tried various connection strings, but get the same result.

This is all a bit vague I know, but any ideas?
 
Stefan Schmiedl...
Posted: Thu Oct 15, 2009 12:25 am
Guest
On Wed, 14 Oct 2009 11:27:12 -0700 (PDT)
jarober <jarober at (no spam) gmail.com> wrote:

Quote:
I think our ODBC support is Windows only

It is not, if you load a package from store, it's something with
unix and odbc in the name, probably unixodbc ...

I've used it to connect through unixODBC and freeTDS to MSSQL 2000.

So if you have the required backend, you should be able to get to
postgres, too.

s.

Quote:

On Oct 14, 12:51 pm, gargoyle47 <gjdwebs... at (no spam) yahoo.co.uk> wrote:
I have set up some ODBC DSNs in Ubuntu for connection to a postgres DB
via VW7.6.

When I try and run my app I get the message:
     The ODBC CLI Driver is not correctly installed

I have loaded the packages ODBCEXDI and PostgreSQLEXDI
I can connect to the DB using the PostgreSQLEXDIConnection but not the
normal odbcConnection (I get the above message).
I have tried various connection strings, but get the same result.

This is all a bit vague I know, but any ideas?
 
gargoyle47...
Posted: Mon Oct 19, 2009 9:04 am
Guest
On Oct 14, 9:25 pm, Stefan Schmiedl <s... at (no spam) xss.de> wrote:
Quote:
On Wed, 14 Oct 2009 11:27:12 -0700 (PDT)

jarober <jaro... at (no spam) gmail.com> wrote:
I think our ODBC support is Windows only

It is not, if you load a package from store, it's something with
unix and odbc in the name, probably unixodbc ...

I've used it to connect through unixODBC and freeTDS to MSSQL 2000.

So if you have the required backend, you should be able to get to
postgres, too.

s.


I've installed unixODBC via apt-get and I can use the ODBCConfig
utility to set up PostgreSQL-specific ODBC definitions, but I can't
seem to determine the identity of a generic ODBC driver.

The libraries I have installed are:
/usr/lib/odbc/
-rw-r--r-- 1 root root 9516 2008-11-20 15:41 libesoobS.so
-rw-r--r-- 1 root root 5360 2008-11-20 15:41 libmimerS.so
-rw-r--r-- 1 root root 67604 2008-11-20 15:41 libnn.so
-rw-r--r-- 1 root root 5336 2008-11-20 15:41 libodbcdrvcfg1S.so
-rw-r--r-- 1 root root 5328 2008-11-20 15:41 libodbcdrvcfg2S.so
-rw-r--r-- 1 root root 5388 2008-11-20 15:41 libodbcminiS.so
-rw-r--r-- 1 root root 9440 2008-11-20 15:41 libodbcmyS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 libodbcnnS.so
-rw-r--r-- 1 root root 5424 2008-11-20 15:41 libodbcpsqlS.so
-rw-r--r-- 1 root root 148972 2008-11-20 15:41 libodbctxt.so
-rw-r--r-- 1 root root 5352 2008-11-20 15:41 libodbctxtS.so
-rw-r--r-- 1 root root 9720 2008-11-20 15:41 liboplodbcS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 liboraodbcS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 libsapdbS.so
-rw-r--r-- 1 root root 5320 2008-11-20 15:41 libtdsS.so
-rw-r--r-- 1 root root 860 2008-05-11 10:17 psqlodbca.la
-rw-r--r-- 1 root root 475108 2008-05-11 10:18 psqlodbca.so
-rw-r--r-- 1 root root 860 2008-05-11 10:18 psqlodbcw.la
-rw-r--r-- 1 root root 495596 2008-05-11 10:18 psqlodbcw.so

I've tried various combinations but cannot seem to get the correct
settings and my app still returns the original error message.

Any ideas anyone?
 
gargoyle47...
Posted: Mon Oct 19, 2009 1:18 pm
Guest
On 19 Oct, 11:50, Stefan Schmiedl <s... at (no spam) xss.de> wrote:
Quote:
On Mon, 19 Oct 2009 02:04:13 -0700 (PDT)



gargoyle47 <gjdwebs... at (no spam) yahoo.co.uk> wrote:
On Oct 14, 9:25 pm, Stefan Schmiedl <s... at (no spam) xss.de> wrote:
On Wed, 14 Oct 2009 11:27:12 -0700 (PDT)

jarober <jaro... at (no spam) gmail.com> wrote:
I think our ODBC support is Windows only

It is not, if you load a package from store, it's something with
unix and odbc in the name, probably unixodbc ...

I've used it to connect through unixODBC and freeTDS to MSSQL 2000.

So if you have the required backend, you should be able to get to
postgres, too.

s.

I've installed unixODBC via apt-get and I can use the ODBCConfig
utility to set up PostgreSQL-specific ODBC definitions, but I can't
seem to determine the identity of a generic ODBC driver.

The libraries I have installed are:
/usr/lib/odbc/
-rw-r--r-- 1 root root   9516 2008-11-20 15:41 libesoobS.so
-rw-r--r-- 1 root root   5360 2008-11-20 15:41 libmimerS.so
-rw-r--r-- 1 root root  67604 2008-11-20 15:41 libnn.so
-rw-r--r-- 1 root root   5336 2008-11-20 15:41 libodbcdrvcfg1S.so
-rw-r--r-- 1 root root   5328 2008-11-20 15:41 libodbcdrvcfg2S.so
-rw-r--r-- 1 root root   5388 2008-11-20 15:41 libodbcminiS.so
-rw-r--r-- 1 root root   9440 2008-11-20 15:41 libodbcmyS.so
-rw-r--r-- 1 root root   5332 2008-11-20 15:41 libodbcnnS.so
-rw-r--r-- 1 root root   5424 2008-11-20 15:41 libodbcpsqlS.so
-rw-r--r-- 1 root root 148972 2008-11-20 15:41 libodbctxt.so
-rw-r--r-- 1 root root   5352 2008-11-20 15:41 libodbctxtS.so
-rw-r--r-- 1 root root   9720 2008-11-20 15:41 liboplodbcS.so
-rw-r--r-- 1 root root   5332 2008-11-20 15:41 liboraodbcS.so
-rw-r--r-- 1 root root   5332 2008-11-20 15:41 libsapdbS.so
-rw-r--r-- 1 root root   5320 2008-11-20 15:41 libtdsS.so
-rw-r--r-- 1 root root    860 2008-05-11 10:17 psqlodbca.la
-rw-r--r-- 1 root root 475108 2008-05-11 10:18 psqlodbca.so
-rw-r--r-- 1 root root    860 2008-05-11 10:18 psqlodbcw.la
-rw-r--r-- 1 root root 495596 2008-05-11 10:18 psqlodbcw.so

since you're on a debian(-like) system, let's take a
look at /usr/share/doc/odbc-postgresql (which should be installed
along with the odbc-postgresql package, where the psql* files
probably originated from). The README.debian file therein
tells me to run

  odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template

and this creates the following /etc/odbcinst.ini:

[PostgreSQL ANSI]
Description             = PostgreSQL ODBC driver (ANSI version)
Driver          = /usr/lib/odbc/psqlodbca.so
Setup           = /usr/lib/odbc/libodbcpsqlS.so
Debug           = 0
CommLog         = 1
UsageCount              = 1

[PostgreSQL Unicode]
Description             = PostgreSQL ODBC driver (Unicode version)
Driver          = /usr/lib/odbc/psqlodbcw.so
Setup           = /usr/lib/odbc/libodbcpsqlS.so
Debug           = 0
CommLog         = 1
UsageCount              = 1

HTH,
s.


Yes, that's fine for the PostgreSQL-specific ODBC definitions and I
can get them all to work fine, but what about a generic ODBC driver
for non-PostgreSQL?
My reasons for wanting a generic ODBC driver for non-PostgreSQL is for
possible future use with other DB software. Hope that makes sense.
 
Stefan Schmiedl...
Posted: Mon Oct 19, 2009 2:50 pm
Guest
On Mon, 19 Oct 2009 02:04:13 -0700 (PDT)
gargoyle47 <gjdwebshop at (no spam) yahoo.co.uk> wrote:

Quote:
On Oct 14, 9:25 pm, Stefan Schmiedl <s... at (no spam) xss.de> wrote:
On Wed, 14 Oct 2009 11:27:12 -0700 (PDT)

jarober <jaro... at (no spam) gmail.com> wrote:
I think our ODBC support is Windows only

It is not, if you load a package from store, it's something with
unix and odbc in the name, probably unixodbc ...

I've used it to connect through unixODBC and freeTDS to MSSQL 2000.

So if you have the required backend, you should be able to get to
postgres, too.

s.


I've installed unixODBC via apt-get and I can use the ODBCConfig
utility to set up PostgreSQL-specific ODBC definitions, but I can't
seem to determine the identity of a generic ODBC driver.

The libraries I have installed are:
/usr/lib/odbc/
-rw-r--r-- 1 root root 9516 2008-11-20 15:41 libesoobS.so
-rw-r--r-- 1 root root 5360 2008-11-20 15:41 libmimerS.so
-rw-r--r-- 1 root root 67604 2008-11-20 15:41 libnn.so
-rw-r--r-- 1 root root 5336 2008-11-20 15:41 libodbcdrvcfg1S.so
-rw-r--r-- 1 root root 5328 2008-11-20 15:41 libodbcdrvcfg2S.so
-rw-r--r-- 1 root root 5388 2008-11-20 15:41 libodbcminiS.so
-rw-r--r-- 1 root root 9440 2008-11-20 15:41 libodbcmyS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 libodbcnnS.so
-rw-r--r-- 1 root root 5424 2008-11-20 15:41 libodbcpsqlS.so
-rw-r--r-- 1 root root 148972 2008-11-20 15:41 libodbctxt.so
-rw-r--r-- 1 root root 5352 2008-11-20 15:41 libodbctxtS.so
-rw-r--r-- 1 root root 9720 2008-11-20 15:41 liboplodbcS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 liboraodbcS.so
-rw-r--r-- 1 root root 5332 2008-11-20 15:41 libsapdbS.so
-rw-r--r-- 1 root root 5320 2008-11-20 15:41 libtdsS.so
-rw-r--r-- 1 root root 860 2008-05-11 10:17 psqlodbca.la
-rw-r--r-- 1 root root 475108 2008-05-11 10:18 psqlodbca.so
-rw-r--r-- 1 root root 860 2008-05-11 10:18 psqlodbcw.la
-rw-r--r-- 1 root root 495596 2008-05-11 10:18 psqlodbcw.so

since you're on a debian(-like) system, let's take a
look at /usr/share/doc/odbc-postgresql (which should be installed
along with the odbc-postgresql package, where the psql* files
probably originated from). The README.debian file therein
tells me to run

odbcinst -i -d -f /usr/share/psqlodbc/odbcinst.ini.template

and this creates the following /etc/odbcinst.ini:

[PostgreSQL ANSI]
Description = PostgreSQL ODBC driver (ANSI version)
Driver = /usr/lib/odbc/psqlodbca.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 1

[PostgreSQL Unicode]
Description = PostgreSQL ODBC driver (Unicode version)
Driver = /usr/lib/odbc/psqlodbcw.so
Setup = /usr/lib/odbc/libodbcpsqlS.so
Debug = 0
CommLog = 1
UsageCount = 1

HTH,
s.
 
Stefan Schmiedl...
Posted: Tue Oct 20, 2009 1:23 am
Guest
On Mon, 19 Oct 2009 06:18:23 -0700 (PDT)
gargoyle47 <gjdwebshop at (no spam) yahoo.co.uk> wrote:

Quote:
Yes, that's fine for the PostgreSQL-specific ODBC definitions and I
can get them all to work fine, but what about a generic ODBC driver
for non-PostgreSQL?
My reasons for wanting a generic ODBC driver for non-PostgreSQL is for
possible future use with other DB software. Hope that makes sense.

Ah, now I get it (I think).

There is no such thing as a generic ODBC driver.

or:

Every ODBC driver backend implements the same interface required
to be called an ODBC driver.

This means that if you develop your application with postgres and
restrict yourself to the ODBC conforming subset of SQL commands,
you can replace the postgres driver with the mysql ODBC driver and
your application will continue to work (if you provide the equivalent
database).

A specific ODBC driver might allow you to pass any SQL statement
to the database server. If you use server-specific code, which does
not conform to the ODBC SQL specs, you are going to have a problem.

HTH,
s.
 
gargoyle47...
Posted: Tue Oct 20, 2009 9:11 am
Guest
On 19 Oct, 22:23, Stefan Schmiedl <s... at (no spam) xss.de> wrote:
Quote:
On Mon, 19 Oct 2009 06:18:23 -0700 (PDT)

gargoyle47 <gjdwebs... at (no spam) yahoo.co.uk> wrote:
Yes, that's fine for the PostgreSQL-specific ODBC definitions and I
can get them all to work fine, but what about a generic ODBC driver
for non-PostgreSQL?
My reasons for wanting a generic ODBC driver for non-PostgreSQL is for
possible future use with other DB software. Hope that makes sense.

Ah, now I get it (I think).

There is no such thing as a generic ODBC driver.

or:

Every ODBC driver backend implements the same interface required
to be called an ODBC driver.

This means that if you develop your application with postgres and
restrict yourself to the ODBC conforming subset of SQL commands,
you can replace the postgres driver with the mysql ODBC driver and
your application will continue to work (if you provide the equivalent
database).

A specific ODBC driver might allow you to pass any SQL statement
to the database server. If you use server-specific code, which does
not conform to the ODBC SQL specs, you are going to have a problem.

HTH,
s.

Okay, that helps, thanks.
 
 
Page 1 of 1    
All times are GMT
The time now is Mon Nov 30, 2009 11:12 pm