|
Dexterity Programming Question |
Post Reply ![]() |
Author | |
dc_calif ![]() MicrosoftDynamicsForums.com Member ![]() Joined: February 04 2010 Location: Calif Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() 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 AS DECLARE @Count int /* Count the number of employees over age 65 */ SELECT @Count = count(first_name) from EMPLOYEES where Age > 65 RETURN @Count 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? Thanks |
|
![]() |
|
Sponsored Links | |
![]() |
|
BounPhommarath ![]() MicrosoftDynamicsForums.com Member ![]() Joined: April 24 2018 Location: Canada Status: Offline Points: 1 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |