ODBC Driver for PostGreSQL

Xbase++ 2.0 Build 554 or later
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

ODBC Driver for PostGreSQL

#1 Post by rdonnay »

Is anyone using an ODBC driver for PostGreSQL?

I installed the Devart ODBC Driver for PostgreSQL and I can make a connection successfully, however I cannot get any SELECT statements to work.

cConnect := "DBE=odbcdbe;DRIVER=Devart ODBC Driver for PostgreSQL;"
cConnect += "SERVER=localhost;DB=northwind;UID=postgres;PWD=" + GetEnv('POSTGRESQL_PASSWORD')

SELECT * from customer gives the following error:

[HY000][0][Devart][ODBC][PostgreSQL]relation "customer" does not exist

No problem when using SELECT statements from PgAdmin.
The eXpress train is coming - and it has more cars.

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: ODBC Driver for PostGreSQL

#2 Post by Auge_Ohr »

did you used the 32bit ODBC Driver ... :whistle:
greetings by OHR
Jimmy

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#3 Post by rdonnay »

did you used the 32bit ODBC Driver
Yes, it is. It would not have even connected if it were the 64 bit.
I am thinking that the problem may be related to versions.

This is an ODBC driver for PostGreSQL 2.2.

This is confusing, because I'm using 8.3 (the version from the Alaska website).
I need to figure this out.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#4 Post by rdonnay »

This is an ODBC driver for PostGreSQL 2.2.
That's what it says on their download page.
That cannot be correct. This is Devart's version number.
I just found more info that it is compatible with PostGreSQL version 10.

I'm still asking the question: Is anyone using the ODBCDBE with PostGreSQL server?
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#5 Post by rdonnay »

I figured it out.

The connection ignored DB=northwind in the connection string.
The correct syntax is Database=northwind.
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ODBC Driver for PostGreSQL

#6 Post by unixkd »

Let us know how it perform

That is the real concern

Joe

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#7 Post by rdonnay »

Let us know how it perform
I am having a lot of problems.
I suspect that the Xbase++ ODBCDBE will not work with PostGreSQL.
It isn't even listed in the documentation under ODBCDBE.

Some SELECT statements work.
Others will give an error on dbSkip().
The eXpress train is coming - and it has more cars.

User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

Re: ODBC Driver for PostGreSQL

#8 Post by unixkd »

I really think that Alaska made a mistake by developing a DBE for postgresql. It would have been better to do something similar to SQLExpress that can use any DBMS. May be invest heavily in ODBCDBE for example instead of DBE for A and another DBE for B. As at today majority of Xbase++ developers dont use ODBCDBE or PGDBE as it were. I stand to be corrected. The only client/server DBE that is really doing fine is ADSDBE.

Joe

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#9 Post by rdonnay »

The only client/server DBE that is really doing fine is ADSDBE.
ADSDBE is very good and is my favorite, however I have had good success with ODBCDBE and Microsoft SQLServer.
The eXpress train is coming - and it has more cars.

User avatar
rdonnay
Site Admin
Posts: 4728
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: ODBC Driver for PostGreSQL

#10 Post by rdonnay »

It appears that many of my problems are due to the ODBC driver I was using - Devart.

I installed the postgreSQL Unicode driver from https://www.postgresql.org/ftp/odbc/versions/msi/ and am now getting much better results.

Testing is continuing.
The eXpress train is coming - and it has more cars.

Post Reply