Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqqvC-0000R7-51 for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 04:34:02 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jqqv9-0005KC-PX for pgsql-general@arkaria.postgresql.org; Thu, 02 Jul 2020 04:33:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jqqv9-0005K4-22 for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 04:33:59 +0000 Received: from sonic310-25.consmr.mail.ne1.yahoo.com ([66.163.186.206]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jqquz-0005eR-VY for pgsql-general@lists.postgresql.org; Thu, 02 Jul 2020 04:33:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1593664426; bh=VX6acnLLdWOcyovcwLpevqgvOZKZPuVzJ2RJIKKWKoo=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=RFu1BgOnyriXVzTEFrLNWEFyFpvTgwNR0pQnMstuk0T2lNTgUXuNfo1JRdEu1QND5bEvjmZ6PncNKdQFbeO4oUp//qI+l3EH7dH/oEPNFkSJ9Blqb7RWhEg/LUe695OjQtin6NqIC1n2iYdsdoWxACQDzjI0/avtOkfuL8Ygt0Upa/yvuWeKbg0HdYKLPqMAPTmcN9ljYstT5GNfV24PMzwTVWRQnq17snDMws9hFutrncB1kKWYzO9kFvaS9v/RdaY3IY5PJnIsqxJHsUtjN1qF6C9VIs8cloJD6hrJhv0g0D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GNIE6JmEoAGtgpFqOlOCm2J NgeCSwbojQOYg_kXt13m7bDiCe28fCVcrfUTlBhBTAtcCfSJwLs0E7zD4P3HSYCMK3Xrt7tNr9fO Au8QG_CtXxgw_dwnEZiUECquABM_NL0J9c_auyIgHxdAuhMnIhL8TFML769R99JB5YrVxn6iQF5K xa9OiMPZeNoZ4TLoZosZhPvZEey5Q33R3QFtS3xxMKXV5dCwtXUVRnxH34QuNMsaZETq2itXmE3H SKPgE3oHiwwKH5sqI5uz2skRSCNCuUBnjC0Nyf8z0pqHEHcfZifVavOVr3ew1dE86Q_okQslQy7q hLzDaStSm6fsbNJZEAk.XGHsV9D2i7cni1VNzYHHb_5kZMw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Thu, 2 Jul 2020 04:33:46 +0000 Date: Thu, 2 Jul 2020 04:33:41 +0000 (UTC) From: Virendra Kumar Reply-To: Virendra Kumar To: Adrian Klaver , Rene de Gek Cc: Matthias Apitz , pgsql-general@lists.postgresql.org Message-ID: <1534600218.1364001.1593664421858@mail.yahoo.com> In-Reply-To: References: <20200626133135.GA9806@sh4-5.1blu.de> <7b2cdded-904d-4ec5-7c8c-9d41aae7880a@aklaver.com> Subject: Re: Connecting Powerbuilder / EAserver to PostgreSQL server 11 via ODBC or JDBC MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1364000_1093559674.1593664421856" X-Mailer: WebService/1.1.16197 YMailNorrin Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Firefox/68.0 Content-Length: 12257 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk ------=_Part_1364000_1093559674.1593664421856 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 wrote: =20 =20 Hi Adrian, Thank you for your reply. This was one of the things that Matthias has also= =C2=A0suggested to us, referring to https://sybase.public.easerver.powerbuilder.narkive.com/MsoAXSQJ/problem-co= nnecting-to-database-from-easerver-component. 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=C2=A0sqlc= a.DBMS, the application log has 999 without an errortext: fnv_connect: -1DBHandle is 0Setting up n_tr DBMS: DBParm: CacheName=3D'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=C2=A0= : Fatal Error. Unable to initialize DatabaseMetaData class." fnv_connect: -1DBHandle is 0 Setting up n_tr DBMS: JDBCDBParm: CacheName=3D'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=3DODBC, we also get th= e=C2=A0999, but with the errortext about the invalid handle. fnv_connect: -1DBHandle is 0 Setting up n_tr DBMS: ODBC DBParm: CacheName=3D'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=C2= =A0out of ideas. Adrian Klaver wrote: A quick search found that this code be returned if the correct server=20 type is not specified in EAServer. =20 ------=_Part_1364000_1093559674.1593664421856 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
System level call trace migh= t help little bit using strace/truss utility.

Regards,
Virendra Kumar

=20
=20
On Wednesday, July 1, 2020, 9:26:09 PM PDT, Rene de Gek= <renedegek@gmail.com> wrote:


Hi Adrian,
Thank you for your reply. Thi= s 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-easerver-component.

We do set t= he 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 with= out an errortext:

fnv_= connect: -1
DBHandle is 0
Setting up n_tr
DBMS= :
DBParm: CacheName=3D'pgsqlODBC12'
Aut= ocommit: false
connect using i_tr...
db= error event triggered on n_tr
code: 999
sqlerrortext:
sqlsyntax:
SQLErrText:
sqldbcode: 999
sqlcode: -1

Wh= en we try to connect to ODBC, but we set sqlca.DBMS incorrectly to JDBC, the code is 9= 99, but there is a message "sqlerrortext: Java Exception : Fatal Error. Unable t= o initialize DatabaseMetaData class."

fnv_connect: -1
DBHandle is 0
Setti= ng up n_tr
DBMS: JDBC
DBParm: CacheName=3D'pgsqlODBC12'
Autocommit: false
connect using i_tr...
dberror event triggered on n_tr
code: 999
sqlerrortext: Java Exception : Fatal Error. Unable to initialize<= br style=3D"font-family:sans-serif;font-size:12.8px;" clear=3D"none">DatabaseMetaData class.<= /span>
sqlsyntax:=
SQLErrText: Java Except= ion : Fatal Error. Unable to initialize

DatabaseMetaData class.
sqldbcode: 999
sqlcode: -1

When connecting to ODBC using the correct sqlca.DBMS=3DOD= BC, we also get the 999, but with the errortext about the invalid handle.<= br style=3D"font-family:sans-serif;font-size:12.8px;" clear=3D"none">
fnv_connect: -1
DBHandl= e is 0
Setting up n_tr
DBMS: ODBC
DBParm: CacheName=3D'pgsqlODBC12'
Autocommit= : false
connect using i_tr...
dberror e= vent triggered on n_tr
code: 999
sqlerr= ortext: An invalid handle was passed in a call to the database driver.
sqlsyntax:
SQLErrText: An invalid handle wa= s passed in a call to the database driver.
sqldbcode: 999=
sqlcode: -1

<= span style=3D"font-family:sans-serif;font-size:12.8px;">Unfortunately, it s= eems that the error 999 can have several causes.


On the EAServer side we have tried all kind of t= hings.
If the c= onnection log from the driver looks okay I am afraid we have ran out of ideas.


Adrian Klaver <adrian.kla= ver@aklaver.com>wrote:

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

------=_Part_1364000_1093559674.1593664421856--