1. Paul Shue
  2. PowerBuilder
  3. Friday, 4 August 2023 16:29 PM UTC

Error Message displays the following: A database Error has occurred DataBase Error Code 999

Database Error Message: Select Error: An invalid handle was passed in a call to the database driver.

This error is not always happening but clients are tired of seeing it. Does not appear that anything is actually wrong with
the dw that is retrieved. It is a nested dw with many subreports. I have taken each subreport and retrieved in db painter
and I do not get the error. I have googled this dberror/powerbuilder and a suggestion was made to check the retrieverow
event to see it there was code there. I checked and there is nothing in the retrieverow event.

 

PB Version

Paul Shue Accepted Answer Pending Moderation
  1. Monday, 7 August 2023 12:04 PM UTC
  2. PowerBuilder
  3. # 1

I created a dbtrace.log - however the information about 999  db error is subject to interpretation (see 999 in log sample). The datawindow where the retrieve is happening does not have a count field. What does syntax error mean and if that was the case I should be getting the error every time and that is not the case. Does it mean I need the lastest driver (MSODBCSQL17.DLL)?

(0FD25440): LOGIN: (31.445 MS / 31.445 MS)
(0FD25440): CONNECT TO Trace ODBC:
(0FD25440): USERID=elmtree_lims
(0FD25440): DATABASE=LIMS_test
(0FD25440): SERVER=sqhosted-west
(0FD25440): DBPARM=ConnectString='DSN=LIMS_test;UID=elmtree_lims;PWD=<******>' (0.000 MS / 31.445 MS)
(0FD25440): DISCONNECT: (0.103 MS / 31.548 MS)
(0FD25440): SHUTDOWN DATABASE INTERFACE: (0.000 MS / 31.548 MS) (2599.865 MS / 11647.299 MS)
(0C1D6C50): *** ERROR 999 ***(rc -1) : SQLSTATE = 07001
[Microsoft][ODBC Driver 17 for SQL Server]COUNT field incorrect or syntax error
(0C1D6C50): CANCEL: (0.000 MS / 11647.299 MS)

Comment
  1. Paul Shue
  2. Monday, 7 August 2023 15:54 PM UTC
FYI - the main dataobject is a composite dw.
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 7 August 2023 16:04 PM UTC
I'd recommend to report this as a bug. It seems very weird that you get a DISCONNECT and a SHUTDOWN DATABASE INTERFACE. I'm not surprised that anything after that would generate an error. Is your connection timing out somehow?

regards.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 4 August 2023 21:29 PM UTC
  2. PowerBuilder
  3. # 2

Set your DBMS to "TRACE ODBC" and see what you get.

I've seen this 999 error plaguing many companies and devs over many years now. Tired of it !

:)

Comment
There are no comments made yet.
Paul Shue Accepted Answer Pending Moderation
  1. Friday, 4 August 2023 19:53 PM UTC
  2. PowerBuilder
  3. # 3

Connection properties

The datawindow does NOT use a stored procedure for its datasource

Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Friday, 4 August 2023 19:38 PM UTC
  2. PowerBuilder
  3. # 4

Hi, Paul -

Which PB database interface (SQLCA.DBMS = "???") are you using? Can you please show us all of the SQLCA connection properties (mask out any sensitive values, of course), especially DBParm string. Does the retrieve that is failing use a stored procedure for its data source?

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.