Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Sunday, August 24, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Unable to Parse a StoredProcedure with parameters
Paul Zelinski
Posts: 17
 
Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Jun 08 9:04 AM
I created a stored Procedure in SQL Management Studio called dbo.ewusp_CalculateSalesClaimsRatio which takes an input parameter which would be the accountid of an Account.

In my code i set the SQL command to the following

strSQL = "exec dbo.ewusp_CalculateSalesClaimsRatio '" & txtAccountID.Text & "'"

and the Architect returns an error that it is unable to parse SQL.

When I default the SP parameter to a value of an AccounId and set

strSQL = "exec dbo.ewusp_CalculateSalesClaimsRatio" it works fine.

Is there a problem with SLX SQL parser that it can't read parameters on Stored procedures?
[Reply][Quote]
Mark Richardson
Posts: 25
 
Re: Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jun 08 4:27 AM
Hi Paul,

I haven't studied this massively and/or definitively but did get a similar problem myself and decided to try the sql using a standard ADODB connection, rather than using the SLX 'Architect' connection - this then worked for me.

Try using the connection example below (obviously changing the Server/DB references to your own) and see how you get on...

Dim objConn
Set objConn = CreateObject("ADODB.Connection")
objConn.Open ("Provider=sqloledb;Data Source=SLXServer;Initial Catalog=SLXDb;User Id=saassword=sapwd;")
objConn.Execute("exec dbo.ewusp_CalculateSalesClaimsRatio '" & txtAccountID.Text & "'")
objConn.Close
Set objConn = Nothing
[Reply][Quote]
Timmus Agersea
Posts: 328
 
Re: Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Jun 08 12:18 PM
Paul, try adding your parameters to the command.parameters collection rather than inline.

Command.CommandText = "ewusp_CalculateSalesClaimsRatio"
Command.Parameters("@AccountID").Value = txtAccountID.Text

If this does not work, please post your code. We may be able to spot issues with the ado object properties or something along those lines.

Timmus
[Reply][Quote]
Paul Zelinski
Posts: 17
 
Re: Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jun 08 3:47 PM
Thanks for the info. I am in arizona starting sunday at The Saleslogix architect class. I will try your idea when i get back.
[Reply][Quote]
Paul Zelinski
Posts: 17
 
Re: Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 21 Jun 08 3:48 PM
Hi Timmus,
as i mentioned to Mark I'm in Arizona to get information overload from the Salelogx architect class. Thanks for the help.
[Reply][Quote]
John Gundrum
Posts: 632
Top 10 forum poster: 632 posts
 
Re: Unable to Parse a StoredProcedure with parametersYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Jul 08 8:47 AM
Any answers for this? I have the same problem. Here is the code

   strSQL = "EXECUTE c_GetOpportunityTrend @lcOpportunityid = '" & frmOpportunityTrends.CurrentID & "'"

Set objCon = Application.GetNewConnection
Set objRS = CreateObject("ADODB.Recordset")
objRS.CursorType = 3 'adOpenStatic
objRS.CursorLocation = 3 'adUseClient
objRS.LockType = 3 'adLockOptimistic
objRS.Open strSQL, objCon 'Provider


Thanks!
John G.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 8/24/2025 11:32:06 AM