Hi,
Anyone have a clue as to why ExecuteLocalProcedure will not accept the second parameter passed?
I can run this from the Tessitura.asmx interface web page with no problem. However, when I try to pass it directly from a web page I've created, I get an error "Procedure or function [name] expects parameter '@sp_act_dt_date', which was not supplied."
Here's the parameters I pass in the procedure call string, verbatim; @sp_act_code=25&@sp_act_dt_date=09/24/2010
I've tried delimiting the "&" symbol that separates the parameters and get an "invalid character" error, which seems consistent with the documentation.
Not sure what I'm missing.
Try sending the entire thing as a string:
"@sp_act_code=25&@sp_act_dt=09/24/2010"
or cast the date as a string:@sp_act_code=25&@sp_act_dt="09/24/2010"
I seem to recall having a similar problem.
When sending quotes around the procedure values parameter -
System.Data.SqlClient.SqlException: Invalid parameter identifiers in @parameter_values
When sending only the date in quotes -
System.Data.SqlClient.SqlException: Procedure or function 'LP_Special_Activity_Summary' expects parameter '@sp_act_dt_date', which was not supplied.
Baffled...
-
I accidentally mistyped the @sp_act_dt_date parameter - make sure you didn't just copy what I wrote but that the parameter name matches what is being sent. That is odd.
I wish things were that simple...
It was a mistype. Here's exactly what I'm sending
LocalProcedureValues=@sp_act_code=25&@sp_act_dt_date=09/24/2010
Still not working. I still get an error saying it expects the second parameter, 'sp_act_dt_date' when I send the above string.
Have you tried running a sql trace to see if there is anymore info? Also mayeb try running the WP_LOCAL_PROCEDURE to see if that has anymore info.
It's a standard SQL error
"System.Data.SqlClient.SqlException: Procedure or function 'LP_Special_Activity_Summary' expects parameter '@sp_act_dt_date', which was not supplied."
This tells me that the string is not well formed as to be able to have SQL recognize the second parameter being passed.
So, what am I doing wrong that is preventing SQL from being able to get that second parameter?
Gordon
Try sending the date as 2010-09-24. I'm not sure if the parameters' parser accepts / as a valid character.
Fernando
Thank you but I get the exact same error.
And for the record, I can enter that parameters string in the .asmx web page and it will NOT return the error. This happens only when I try to pass it in the GET.
Try replacing the & by %26 (the hexadecimal value for &). It seems to work ok in my setup. Better yet, can you use POST instead of GET? I never had this kind of problems when using HTTP GET.
The '%26' replacement did the trick!!
Thanks!