Solved

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

Posted on 2011-02-21
2
2,093 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

When CRM stops functioning propperly or mysteriously disappears then this is something you should always check. This can be useful when looking at an end users machine or your own machine if you are the end user. It may be fairly obvious to some but…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

623 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