pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Virendra Kumar <viru_7683@yahoo.com>
To: Adrian Klaver <adrian.klaver@aklaver.com>
To: Rene de Gek <renedegek@gmail.com>
Cc: Matthias Apitz <guru@unixarea.de>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Connecting Powerbuilder / EAserver to PostgreSQL server 11 via ODBC or JDBC
Date: Thu, 2 Jul 2020 04:33:41 +0000 (UTC)
Message-ID: <1534600218.1364001.1593664421858@mail.yahoo.com> (raw)
In-Reply-To: <CAC9DREvo2AS5b72cnb=4EQaiu3-3_HjXkTphSO9fuPWP90CY_w@mail.gmail.com>
References: <20200626133135.GA9806@sh4-5.1blu.de>
	<7b2cdded-904d-4ec5-7c8c-9d41aae7880a@aklaver.com>
	<CAC9DREvo2AS5b72cnb=4EQaiu3-3_HjXkTphSO9fuPWP90CY_w@mail.gmail.com>

System level call trace might help little bit using strace/truss utility.

Regards,
Virendra Kumar
    On Wednesday, July 1, 2020, 9:26:09 PM PDT, Rene de Gek <renedegek@gmail.com> wrote:  
 
 Hi Adrian,

Thank you for your reply. This was one of the things that Matthias has also suggested to us, referring to
https://sybase.public.easerver.powerbuilder.narkive.com/MsoAXSQJ/problem-connecting-to-database-from....

We do set the server type to ODBC.

The error 999 shows up with several error messages. For example:

When we connect to PostgreSQL using ODBC but we forget to fill in sqlca.DBMS, the application log has 999 without an errortext:

fnv_connect: -1DBHandle is 0Setting up n_tr
DBMS:
DBParm: CacheName='pgsqlODBC12'
Autocommit: false
connect using i_tr...
dberror event triggered on n_tr
code: 999
sqlerrortext:
sqlsyntax:
SQLErrText:
sqldbcode: 999
sqlcode: -1

When we try to connect to ODBC, but we set sqlca.DBMS incorrectly to JDBC, the code is 999, but there is a message "sqlerrortext: Java Exception : Fatal Error. Unable to initialize DatabaseMetaData class."

fnv_connect: -1DBHandle is 0
Setting up n_tr
DBMS: JDBCDBParm: CacheName='pgsqlODBC12'
Autocommit: false
connect using i_tr...
dberror event triggered on n_tr
code: 999
sqlerrortext: Java Exception : Fatal Error. Unable to initialize
DatabaseMetaData class.
sqlsyntax:
SQLErrText: Java Exception : Fatal Error. Unable to initialize
DatabaseMetaData class.
sqldbcode: 999
sqlcode: -1

When connecting to ODBC using the correct sqlca.DBMS=ODBC, we also get the 999, but with the errortext about the invalid handle.

fnv_connect: -1DBHandle is 0
Setting up n_tr
DBMS: ODBC
DBParm: CacheName='pgsqlODBC12'
Autocommit: false
connect using i_tr...
dberror event triggered on n_tr
code: 999
sqlerrortext: An invalid handle was passed in a call to the database driver.
sqlsyntax:
SQLErrText: An invalid handle was passed in a call to the database driver.
sqldbcode: 999
sqlcode: -1

Unfortunately, it seems that the error 999 can have several causes.

On the EAServer side we have tried all kind of things.
If the connection log from the driver looks okay I am afraid we have ran out of ideas.

Adrian Klaver <adrian.klaver@aklaver.com>wrote:


A quick search found that this code be returned if the correct server 
type is not specified in EAServer.


  

view thread (7+ messages)

Message-ID: <1534600218.1364001.1593664421858@mail.yahoo.com>
Permalink:  ../1534600218.1364001.1593664421858@mail.yahoo.com/
Also on:    postgresql.org/message-id/1534600218.1364001.1593664421858@mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: viru_7683@yahoo.com, adrian.klaver@aklaver.com, renedegek@gmail.com, guru@unixarea.de
  Subject: Re: Connecting Powerbuilder / EAserver to PostgreSQL server 11 via ODBC or JDBC
  In-Reply-To: <1534600218.1364001.1593664421858@mail.yahoo.com>
  References: <20200626133135.GA9806@sh4-5.1blu.de> <7b2cdded-904d-4ec5-7c8c-9d41aae7880a@aklaver.com> <CAC9DREvo2AS5b72cnb=4EQaiu3-3_HjXkTphSO9fuPWP90CY_w@mail.gmail.com> <1534600218.1364001.1593664421858@mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox