[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

PostgreSQL & ODBC & OpenOffice



Hello
I'm new with PostgreSQL, more over I'm new with DB at all.
I'm currently successfully connect to the DB "mydb" with owner "gusti" in three different modes.
   1: Locally from the system user "gusti".
2: From another user in the next form: "psql -h localhost mydb gusti" and giving the correct password after well.
   3: Using the library "libsqlxx-dev" with the next settings:
       SQL.setUsername("gusti");
       SQL.setPassword("thePassw");
       SQL.setHostname("localhost");
       SQL.setPort(5432);//don't must
       SQL.setDatabase("mydb");
       SQL.setType(SQLXX_ODBC);
       SQL.setDriver("/usr/lib/postgresql/lib/psqlodbc.so");
       SQL.connect();

My problem start when I use OpenOffice. Almost the same error: "[unixODBC][Driver Manager]Data source name not found, and no default driver specified" There aren't to much values in the OpenOffice->tool->Data Sources ... Can you please help me with this ? In the connection using "ODBC" I use in the "Data source URL" the next source "//localhost:5432/mydb", and nothing for the "Driver setting", and the "user name" is "gusti" and when pick the Tab "Tables" I request for a Password and then I receive the error. So, What is the problem?

My file odbc user files are:
~/.odbcinst.ini
   [PostgreSQL]
   Description             = PostgreSQL ODBC driver
   Driver                  = /usr/lib/odbc/psqlodbc.so
   Setup                   = /usr/lib/odbc/libodbcpsqlS.so
   Debug                   = 0
   CommLog             = 1
   FileUsage               = 1

~/.odbc.ini is:
   [PostgreSQL]
   Description         = PostgreSQL gusti user
   Driver              = PostgreSQL
   Trace               = No
   TraceFile           = /tmp/psqlodbc.log
   Database            = mydb
   Servername          = localhost
   UserName            = gusti
Password = Port = 5432
   Protocol            = 6.4
   ReadOnly            = Yes
   RowVersioning       = No
   ShowSystemTables    = No
   ShowOidColumn       = No
   FakeOidIndex        = No
   ConnSettings        =


 Thank you,
       Gustavo

B.W. If you know how to use JDBC driver , almost can help. Thank you again, Gustavo



Reply to: