1. tim schmidt
  2. PowerBuilder
  3. Monday, 04 December 2017

We are just converting our application from Oracle to SQL Server.

When running stored procedures, sometimes running them twice in a row generates the "Procedure has already been executed" error and sometimes in doesn't.

We are not closing the procedure in any scripts, just declare and execute, and same as we do for Oracle.

 

declare cca_variance_report_sql procedure for ddf_cca_variance_report @as_curr_invoice = :is_invoice_no, @as_prev_invoice = :is_prev_invoice_no;
 
execute cca_variance_report_sql;

This testing is SQL Server 2014 with a PB 11.5 app currently.

Appreciate your thoughts.
Tim

 

Mike S Accepted Answer Pending Moderation
0
Votes
Undo

 

https://archive.sap.com/discussions/thread/3518591

 

 

Comment
indicates that you need to close the procedure:  close cca_variance_report_sql;

  1. Mike S
  2. Tuesday, 5 December 2017
There are no comments made yet.
  1. Tuesday, 5 December 2017
  2. PowerBuilder
  3. # 1
Matthew Balent Accepted Answer Pending Moderation
0
Votes
Undo

How are you connecting to SQL server?  What is your autocommit?

Comment
There are no comments made yet.
  1. Tuesday, 5 December 2017
  2. PowerBuilder
  3. # 2
Andres Slachevsky Accepted Answer Pending Moderation
0
Votes
Undo

Have you try to declare the procedure as a local external function in your transaction object and call it like a funcion?
If you generate a DBMS trace file does it shows any relevant information?

Comment
There are no comments made yet.
  1. Tuesday, 5 December 2017
  2. PowerBuilder
  3. # 3
  • Page :
  • 1


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