web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

A Cursor with the name 'MyInsertCursor' already exists.

(0) ShareShare
ReportReport
Posted on by 1,197

Hi,

I am getting following error at one of my client server while executing a stored procedure from GP. This sql procedure is being called from Dex.

SQL Error: 16915 - A Cursor with the name 'MyInsertCursor' already exists.

Same chunk file and sql proc is working fine in my Test server.

More details: I am doing "insert into table" inside the procedure. I am getting above error after this Insert. Through Profiler I got to know this.

Quick response is highly appreciated.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mahmoud Saadi Profile Picture
    32,738 on at

    It is quite possible that this is a "global" cursor; which means that each time you call this procedure, the cursor will be defined.

    Try to use a "Local" cursor instead

    DECLARE  MyInsertCursor CURSOR LOCAL

    Your feedback is highly appreciated,

  • Manjunath Vemula Profile Picture
    1,197 on at

    Thanks for your response Mahmoud.

    I made this change and it is working fine. But same trigger working correctly at one server but not in other.

    Suggestion on this would be highly appreciated.

  • Mahmoud Saadi Profile Picture
    32,738 on at

    You will have to track this down on the SQL profiler level.

    Your feedback is highly appreciated,

  • Verified answer
    Manjunath Vemula Profile Picture
    1,197 on at

    Sorry for delayed response.

    By using profiler found it was not getting refreshed. Creating again solved the issue.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
mtabor Profile Picture

mtabor 1

#2
Victoria Yudin Profile Picture

Victoria Yudin 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans