1. Terry Schaff
  2. PowerBuilder
  3. Thursday, 17 March 2022 17:32 PM UTC

We are currently trying to convert all of our code from Sybase to SQL Server database (v19) using MSOLEDBSQL SQL Server database driver v18.5

 

Our latest critical issue is a datawindow update that is returning a -3 from a datawindow update.

We tried to look up what a -3 means, when updating SQL Server and do not find anything.

Any ideas on solution or what a return code of -3 from SQL Server v190 is ?

 

Thanks,

Terry Schaff

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 17 March 2022 20:16 PM UTC
  2. PowerBuilder
  3. # 1

Hi Terry;

  Suggestion:   Try ...  SQLCA.DBMS = "TRACE MSO"

 See if the SQL trace gives you more information as to the -3 DBO error but from the DBMS side of the processing.  HTH

Regards ... Chris

Comment
There are no comments made yet.
Terry Schaff Accepted Answer Pending Moderation
  1. Thursday, 17 March 2022 19:10 PM UTC
  2. PowerBuilder
  3. # 2

Found the following, but i get this problem when absolutely nobody else is on the db:

 

This also defines the -3...........

Instead of working around the -3, I would like t figure out/debug why I'm getting the -3, which is a lot less work than trying to ignore a -3.

---Terry

Comment
  1. John Fauss
  2. Thursday, 17 March 2022 20:32 PM UTC
I've occasionally seen issues similar to your in this Q&A forum. Sometimes a trigger is the cause. Chris's suggestion to temporarily enable tracing in the MSO database interface is a good idea. Have you tried to manually perform this same Update via the PB Database Painter? That would take the DW and application out of the picture for troubleshooting purposes. The problem might be related to permissions on the SQL Server side. Just make sure your DB Profile you are using in the PB IDE is configured the same as what your app uses in its Transaction object.
  1. Helpful
  1. Olan Knight
  2. Saturday, 19 March 2022 23:30 PM UTC
What kind of locking do you use when you retrieve your data? We use "RU" to prevent this kind of thing from occurring.



If you cannot specify that kind of locking, this update might have to be done with embedded SQL where you can fist check to ensure the row you are attempting to update still exists.



The best approach, though, is what you already said: try to figure out how the data you have in your DW is being changed elsewhere.

  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.