Microsoft Dynamics Forums Homepage

Forum Home Forum Home > Microsoft Dynamics GP (Great Plains) > GP - Customization and Integration
  New Posts New Posts RSS Feed - Dexterity Programming Question
  FAQ FAQ  Forum Search   Register Register  Login Login

Dexterity Programming Question

 Post Reply Post Reply
dc_calif View Drop Down Member Member

Joined: February 04 2010
Location: Calif
Status: Offline
Points: 15
Post Options Post Options   Thanks (0) Thanks(0)   Quote dc_calif Quote  Post ReplyReply Direct Link To This Post Topic: Dexterity Programming Question
    Posted: April 17 2018 at 11:29am
I'm trying to call a stored procedure within Dexterity.   I've taken the example from the help files so I know the syntax is correct.

In the Dexterity help it has the following example:

In SQL Create the stored Procedure:
CREATE PROC Count_Seniors
DECLARE @Count int
/* Count the number of employees over age 65 */
SELECT @Count = count(first_name) from EMPLOYEES where Age > 65

Then create a  Dexterity prototype procedure, also named Count_Seniors:

               sproc returns long Ret_Code;
               call sproc "Count_Seniors", Ret_Code;

The problem occurs when I compile the above script.  It tells me 'Cannot find script Count_Seniors'.

I made sure I did a "GRANT EXECUTE ON dbo.Count_Seniors TO DYNGRP"

I'm able to call the Count_Seniors stored procedure from a query window so I know it works.

If I remove the quotes around the call so it looks like this  "call sproc Count_Seniors, Ret_Code;"   When I compile this new code, dexterity blows up with a Dexterity Development Environment has stopped working message.

I'm at a loss of what is going on.

Any suggestions?

Back to Top
Sponsored Links

Back to Top
BounPhommarath View Drop Down Member Member

Joined: April 24 2018
Location: Canada
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote BounPhommarath Quote  Post ReplyReply Direct Link To This Post Posted: April 24 2018 at 10:37am
The code is correct. Something is funky with your dictionary somewhere else. I've encountered an issue like this in the past where Dex would report compile errors seemingly good code and then crash violently. This cost me a lot of wasted project time trying to figure out what was wrong with the code. As it turned out, I had imported a form from another dictionary which had missing resources in the target dictionary. Or it referenced things that weren't in the current dictionary.

Well, good old Dex, had many resources that it had not resolved yet. When I compiled my perfectly good code, Dex exploded due to the completely unrelated (and uncompiled new code). To fix the problem, I had to surgically fix the imported form and made sure it compile correctly first. Then Dex behaved well with my new code.

In short, your code is fine.
Boun Phommarath
Microsoft Dynamics GP Dexterity Expert
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Copyright 2013 All rights reserved. is an independent non-Microsoft website.
Email: contact AT microsoftdynamicsforums DOT com