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

Announcements

No record found.

News and Announcements icon
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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
talty09 Profile Picture

talty09 2

#1
Anthony Beatty Profile Picture

Anthony Beatty 2

#3
CP04-islander Profile Picture

CP04-islander 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans