1. Vipin Dwivedi
  2. PowerBuilder
  3. Thursday, 22 December 2022 19:44 PM UTC

Hello Appeon Folks,

Here is the scenario started happening recently.

We have one window frame on which we open all the window sheet. Recently we added datawindow retrieval in Timer Event where we wait for few seconds setup in some config table and when time reached it will throw. This datawindow run select statement and try to retrieve the message and display as banner message.

When we rolled out this in production, we are getting now Database Error message 

/*** DBError - n_ds(0) TimeStamp: 16/12/22 14:03:32:14 ***/
/*** Database error code: 999
Database error message: Select Error: Only the cancel command is allowed when the rows are pending. ***/

 

I don't know what is causing the issue. Its just a select statement. Is datastore causing some problem or what? What if I write the embedded query instead using datastore for retrieval.

 

This is little critical as this message is popping out frequently.

 

Thanks,

Vipin

 

 

 

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Saturday, 24 December 2022 09:33 AM UTC
  2. PowerBuilder
  3. # 1

May be that two queries are trying to run simultaneously, one from the timer event and the other from normal / regular flow.  

Solution may be
1.  Have another transaction object (as Roland pointed out).
2.  Else go for Multi-threaded (Check A Multi-Threaded Data Retrieval Example - Appeon Community)

HTH

Happiness Always
BKR Sivaprakash

 

Comment
There are no comments made yet.
Roland Smith Accepted Answer Pending Moderation
  1. Friday, 23 December 2022 20:16 PM UTC
  2. PowerBuilder
  3. # 2

SQL Anywhere doesn't support anything like MARS (SQL Server).

I would create a second transaction object. It would have it's own connection to the database. The SQL in the timer event that retrieves messages would use the second transaction object.

 

Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 23 December 2022 14:42 PM UTC
  2. PowerBuilder
  3. # 3

what database is this? what database driver are you using?

If it is sql server, then you may want to check to see if you have MARS on (it is by default with some drivers)

Comment
  1. Roland Smith
  2. Friday, 23 December 2022 18:50 PM UTC
There are multiple Sybase databases. Which one? What version?
  1. Helpful
  1. Vipin Dwivedi
  2. Friday, 23 December 2022 19:33 PM UTC
We are using SQL Anywhere 17 if this helps.
  1. Helpful
  1. Vipin Dwivedi
  2. Friday, 23 December 2022 19:34 PM UTC
and version is 17.0.10.5923
  1. Helpful
There are no comments made yet.
Vipin Dwivedi Accepted Answer Pending Moderation
  1. Thursday, 22 December 2022 20:05 PM UTC
  2. PowerBuilder
  3. # 4

And also does this happen when one transaction object has placed something into DBMS queue and same transaction trying to submit another request?

Comment
There are no comments made yet.
Vipin Dwivedi Accepted Answer Pending Moderation
  1. Thursday, 22 December 2022 20:00 PM UTC
  2. PowerBuilder
  3. # 5

Thanks Chris for your response which you usually do and help the PowerBuilder users. How to check no other DBMS requests are in progress before I hit the Retrieve method?

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 22 December 2022 21:19 PM UTC
Hi Vipin;

You would have to design DW Control and DataStore ancestors that observe the RetrieveStart, RetrieveEnd, UpdateStart & UpdateEnd events. In these events, you would need to set a "Flow of Control" switch (say in the Transaction Object descendant) that a DBMS process was "in progress". If the Timer Event then queries the TO & the "Flow of Control" switch is ON - then a DBMS request is in progress. If that is the case, the Timer just resets the time and returns control. If the DBMS request is *Not* in progress, the Timer Event code then fires its own DML request.

Note that the above design falls down when "in-line" SQL is present in the PB App. So personally, I would think about using a 2nd SQLCA instead (just my $0.02). HTH

Regards ... Chris



Regards ... Chris
  1. Helpful 1
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 22 December 2022 19:50 PM UTC
  2. PowerBuilder
  3. # 6

Hi Vipen;

  This is a common error when you have a DBMS request "in progress" and in a timer event, you make another DBMS request while the 1st request is still in progress (aka waiting for a result set). Hence the " rows are pending" DB error message. The key is to either a) make sure no other DBMS requests are in progress when the timer code executes or b) use a 2nd transaction object. HTH

Regards ... Chris

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.