Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Note: You must have administrative privileges in order to create/edit Roles. Salesforce.com (http://www.salesforce.com/) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales and marke…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
A short film showing how OnPage and Connectwise integration works.

929 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now