-
drspro2
- VIP Member
- Posts: 118
- Joined: 28 Apr 2006 12:03
Postgress ODBC problems
I have installed PostgresQL DB on windows 10 , also installed Postgres ODBC driver . Have configured 1 ODBC data-source in windows data-sources with Postgress data source configured, Tested there with the test-button , that works . Then Run VIP OdbcDemo project, Execute it, the it connects succesfully to the ODBC driver, ( it shows that it is succesfully connected in the message window), Then i want too show the table list from the database with the demo function . It fails to show any tables, that means the table list in the provided list box is empty. In the postgres client commandline / console I can list the tables and there is currently 1 table , the command to list the tables in Postgress is: slash-l , \l . Is . Could it be the case that the Default PFC\ODBC api uses a different table-list command which doesnt match with the postgress command required? If that would be the case i could change the string-(table list ) -command in the odbc PFC? I have been searching in the ODBC pfc files , though i havent found it yet. When it works i could make an odbc Vip postgres implementation with also SQL-table rows to prolog clauses conversion
-
Thomas Linder Puls
- VIP Member
- Posts: 1488
- Joined: 28 Feb 2000 0:01
Re: Postgress ODBC problems
My experience with Postgress is rather limited. I have as test, created a database with a table corresponding to the one used in the simpleODBC demo. And executed that demo towards the Postgress database. And that worked without any problems.
But that demo program does not list tables. Listing tables is done using a special ODBC routine SQLTables. This routine is handled by the ODBC driver. I.e. we are not making some query to obtain the tables, the necessary steps are made inside the ODBC driver.
I would expect that it is implemented correctly in the driver. Therefore I guess that the problem is either that you don't connect to the correct database, but have connected to some other database in the installation. Or that you (i.e. the database user) don't have privileges to list tables. I don't know how to examine or update privileges in Postgress.
But that demo program does not list tables. Listing tables is done using a special ODBC routine SQLTables. This routine is handled by the ODBC driver. I.e. we are not making some query to obtain the tables, the necessary steps are made inside the ODBC driver.
I would expect that it is implemented correctly in the driver. Therefore I guess that the problem is either that you don't connect to the correct database, but have connected to some other database in the installation. Or that you (i.e. the database user) don't have privileges to list tables. I don't know how to examine or update privileges in Postgress.
Regards Thomas Linder Puls
PDC
PDC
-
drspro2
- VIP Member
- Posts: 118
- Joined: 28 Apr 2006 12:03
Re: Postgress ODBC problems
in the ODBC data sources in the driver i changed from Postgres Ansi64 to Unicode64, now it shows the table list
