Solved

PeopleCode Action calling Stored Procedure abends (Executing SQL directly; no cursor.)

Posted on 2011-02-21
2
2,071 Views
Last Modified: 2013-11-23

We have an App Engine that executes a couple of stored procedures. We are running MS SQL Server and the process has run successfully in the past but has been failing for some time.

Is there some restriction on executing stored procedures from within the PeopleCode Action? Any clues?

Here is the section of the log that seems most relevant.

SQL error. Function:  SQLExec

  Error Position:  0

  Return:  8601 - [Microsoft][SQL Native Client][SQL Server]Executing SQL directly; no cursor.
[Microsoft][SQL Native Client][SQL Server]Process Started
[Microsoft][SQL Native Client][SQL Server]Creating daily backup of PS_B_EMP_SCHED_DEN table
[Microsoft][SQL Native Clie

  Statement:  EXEC B_SP_RB_CREATE_IND :1

  Original Statement:  EXEC B_SP_RB_CREATE_IND :1
2011-02-21-15.26.00.999369  AePcdExecutePeopleCode [174] Exception logged: RC=100.

SQL error in Exec. (2,280) B_RB_LVRUPD.DmmyCrt.GBL.default.1900-01-01.Create.OnExecute  PCPC:3039  Statement:32
2011-02-21-15.26.00.999369  DoStepActions [1797] Exception logged: RC=100.
0
Comment
Question by:simonpaul64
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 5

Accepted Solution

by:
simonpaul64 earned 0 total points
ID: 34953097

I have located the source of the problem.

There is a section of the SP that has the following code (pasted below) - and with that code - the execute of the sp fails. When I comment that bit out it runs great.

There is a comment that this code is helpful when the sp is run "manually" - but it screws us up.

DECLARE @X INT
SET @X = @@TRANCOUNT
WHILE @X > 0
BEGIN
  COMMIT
  SET @X = @X - 1
END
0
 
LVL 5

Author Closing Comment

by:simonpaul64
ID: 34953119
The solution is to comment out that code in my last post.
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Acceptance of Oracle Fusion as mainstream ERP 3 425
What ERP development platform 4 59
looking for free crm tool 1 100
crm 2010 on premise 5 117
Salesforce.com’s Console is a great tool to view activities, leads, contacts, accounts and opportunities all in one screen. It is particularly effective during call blocks and working numerous activities at a time in a quick, repetitive fashion (suc…
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question