0 Calling Stored Procedure w/Parameter in Dynamic Data Block 5 David Hanson posted 6 Years Ago Hi all,I have a Dynamic Data Block where I'm attempting to execute a stored procedure while passing a URL parameter. I've tested the SP call using Microsoft SQL Server Management Studio and everything works fine. The query I'm running is, "EXEC spSundayDateGivingAnalytics @sSDate='2018-03-11' " The expected output is given.In RMS, though, I receive an error when I attempt to navigate to the page where I'm trying to call this stored procedure. The error is, "Query Error! Conversion failed when converting date and/or time from character string."Here are the details:URL of the Dynamic Data Block page giving the error: http://rms.mychurchrms.com/page/1544?sSunday=2018-03-18Dynamic Data Block configuration:I've tried setting the Parameters value to "sSDate=sSunday" as well, but the same error is displayed.If I only set Parameters to "sSunday" of "{sSunday} then I see an empty result set -- even though executing the stored procedure in MS Management Studio returns two records, so I know for the selected date there are records that should be returning.I'm not sure what I'm doing wrong as the documentation states that I should be setting Parameters to, "param1=value;param2=value"Any suggestions?
Daniel Hazelbaker 6 years ago Sorry for the wild goose chase, looking at the code again it seems the "=" part is required. So the core issue is that you were not originally passing "sSDate" but rather "sSunday" in the query string. The format of the parameters is "key=defaultvalue", so you would probably want something like "sSDate=2018-01-01" so that it would take any "sSDate" query string parameter, and if none is found use "2018-01-01" as the default value.