1. Jay Hastings
  2. PowerServer
  3. Wednesday, 14 August 2024 18:53 PM UTC

I have a datastore update that works fine running through the IDE but fails on the Web.  It gives no error.  I've run through the debugger and get the same....

if ids_customerproductdata.Update(TRUE, FALSE) <> 1 then

 

 

A database error has occurred.--


Object : n_busobj_customer

Database error code: -1

Database error message:


No changes made to database.

  

 

I had this once before and fixed it by recreating the datastore.  Now I have it on another one.  This is code migrated from a 20+ year old app.

Any ideas?

 

Thanks

Jay

Jay Hastings Accepted Answer Pending Moderation
  1. Friday, 16 August 2024 23:05 PM UTC
  2. PowerServer
  3. # 1

In trying to debug this using the debugger I notice differences between PowerBuilder and PowerServer. 

The datastore had ActiveInd = 1 in the WHERE clause the PS seemed to ignore.  PS would come back with 16 rows where PB would only have the 15 active.

I removed the where clause and added the column to the datastore.  In PS I did a build and deploy and then I ran the debugger from the project.  PS does not recognize it but PB does running through the IDE.

See attached.

What am I missing?

 

Thanks

Jay

Attachments (2)
Comment
  1. Chris Pollach @Appeon
  2. Saturday, 17 August 2024 00:11 AM UTC
Hi Jay;

This sounds like you might be compiling against a slightly different DB Schema than what PS is using. A different DB instance or even DBMS instance or the PS DBMS / DB is the same but the DB login user in PS has different schema privileges. Food for thought. HTH

Regards ... Chris
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Friday, 16 August 2024 03:01 AM UTC
  2. PowerServer
  3. # 2

in powerserver, dberror -1 indicates a transaction timeout.

That is documented but not where you can find it.

 

you want to check your transaction timeouts and make them longer.

Check the update itself to see what it is doing.  Is this sql server? 

Comment
There are no comments made yet.
Jay Hastings Accepted Answer Pending Moderation
  1. Thursday, 15 August 2024 21:06 PM UTC
  2. PowerServer
  3. # 3

Ok...so I did have that as the app started with PFC. I put a messagebox in dberror (messagebox(sqlerrtext,sqlsyntax) and get nothing. Debugger still shows nothing.

Comment
There are no comments made yet.
Jay Hastings Accepted Answer Pending Moderation
  1. Wednesday, 14 August 2024 20:11 PM UTC
  2. PowerServer
  3. # 4

It does have "release 22;"

I'm not familiar with how to code an event on a datastore.  Don't think I've ever done that.

 

Thanks for the reply

Comment
  1. Jay Hastings
  2. Wednesday, 14 August 2024 21:36 PM UTC
Ok...so I did have that. Put a messagebox in dberror (messagebox(sqlerrtext,sqlsyntax) and get nothing. Debugger still shows nothing.

  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 15 August 2024 21:38 PM UTC
Hi Jay;

If you can recreate a simple test case PB app using that DWO, then please open a Support ticket for this issue.

Regards ... Chris
  1. Helpful
  1. Jay Hastings
  2. Friday, 16 August 2024 18:42 PM UTC
Not sure how I'd do that. It works running through PB. It only failed when deployed to PowerServer.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 August 2024 19:11 PM UTC
  2. PowerServer
  3. # 5

Hi Jay;

  Does the DS have the DBError event coded to capture the details of the exact DBMS error?

  Also for the DWO's that fail ... If you edit the DWO source, does it state "release=22.0;"? That means that the DWO has been migrated to the current release. If not, try setting the release number to 22 & save the DWO source back to complete the migration. Then redeploy & test again.  HTH

Regards ... Chris 

Comment
  1. Jay Hastings
  2. Thursday, 15 August 2024 22:49 PM UTC
Yes..it is Release = 22. NOT 22.0 if that's different but I doubt it.



All I get is SQLDBCODE = -1

SQLERRORTEXT says "No changes made to database."

SQLSYNTAX is empty



I tried limiting the number of updatable columns to just a few but still no luck.



Thanks...Jay
  1. Helpful
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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.