1. tim schmidt
  2. PowerBuilder
  3. Monday, 4 December 2017 19:17 PM UTC

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
  1. Tuesday, 5 December 2017 20:28 PM UTC
  2. PowerBuilder
  3. # 1

 

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

 

 

Comment
  1. Mike S
  2. Tuesday, 5 December 2017 20:30 PM UTC
indicates that you need to close the procedure:  close cca_variance_report_sql;

  1. Helpful
There are no comments made yet.
Matthew Balent Accepted Answer Pending Moderation
  1. Tuesday, 5 December 2017 14:37 PM UTC
  2. PowerBuilder
  3. # 2

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

Comment
There are no comments made yet.
Andres Slachevsky Accepted Answer Pending Moderation
  1. Tuesday, 5 December 2017 13:14 PM UTC
  2. PowerBuilder
  3. # 3

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.
  • Page :
  • 1


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