1. Li Mei Weng
  2. PowerBuilder
  3. Monday, 27 November 2017 08:59 AM UTC

Same with Title.

This mistake that made me so battered.

 

Code:

li_rc = inv_luw.of_Update(apo_control, ab_accepttext, ab_resetflag)

messagebox('of_update', sqlca.sqlerrtext) //sqlerrtext return ""

messagebox('of_update', sqlca.sqlcode) //sqlcode return 1

if li_rc = 1 then

    sqlca.of_commit()

    messagebox('commit', sqlca.sqlerrtext) //sqlerrtext return "this sqltransaction has completed;it is no longer usable"

    messagebox('commit', sqlca.sqlcode) //sqlcode return -1

end if

 

Powerbuilder 12.5

8.0 PFC Main - pfc_w_master

 

============================================

sqlca.of_commit()

or

commit;

 

These two codes will cause this problem?

 

Accepted Answer
Roland Smith Accepted Answer Pending Moderation
  1. Monday, 27 November 2017 13:12 PM UTC
  2. PowerBuilder
  3. # Permalink

What is AutoCommit set to? If AutoCommit is True, all statements are committed automatically. In that case you should change it to False, perform updates, commit or rollback, and then change it back to True.

Comment
There are no comments made yet.
Li Mei Weng Accepted Answer Pending Moderation
  1. Monday, 27 November 2017 10:16 AM UTC
  2. PowerBuilder
  3. # 1

sqlca.of_commit()

or

commit;

 

These two codes will cause this problem?

Comment
There are no comments made yet.
René Ullrich Accepted Answer Pending Moderation
  1. Monday, 27 November 2017 09:41 AM UTC
  2. PowerBuilder
  3. # 2

What's your DBMS?

Some database do not allow to commit or rollback twice.

Look for a commit or rollback in one of the updates (may be also in a database procedure!) or for a disconnect.

Comment
  1. Li Mei Weng
  2. Monday, 27 November 2017 09:49 AM UTC
Microsoft SQL Server 2016

  1. Helpful
There are no comments made yet.
Marco Meoni Accepted Answer Pending Moderation
  1. Monday, 27 November 2017 09:40 AM UTC
  2. PowerBuilder
  3. # 3

Hello,
for every Begin Transaction there should be a Commit statement in the PB database (what type is it??) trace log. Look in that file and at some point you will no longer be able to pair the Begin Transaction and Commit statements.
You should look at one of the ancestor PFC windows in your application where code like "execute immediate ls_sql;" most likely produces an extra commit, which is the cause of the error. 
Cheers,
Marco

Comment
  1. Li Mei Weng
  2. Monday, 27 November 2017 10:00 AM UTC
Microsoft Sql Server 2016.



Okay, i'll try to find it...



But the program is the bottom, no ancestors.



 



Thanks for your help :

  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.