- Tony Fahlberg
- SnapDevelop
- Thursday, 6 February 2020 12:07 AM UTC
Hi - I am receiving an "Error: Index was outside the bounds of the array." when converting a datawindow that uses a stored procedure with 3 parameters to a C# Model. I believe I tracked down the issue to my retrieval arguments. In my use of this stored procedure I am always passing in 0 for the first argument therefore had removed one of the retrieval arguments and hard-coded 0 in the call (see below). That datawindow fails to convert with the error mentioned above. When creating the same exact datawindow but using 3 retrieval arguments corresponding to my stored procedure parameters, I was successfully able to covert it.
FAILS: procedure="1 execute dbo.myprocedure;1 @z_sql_log_flag =0, @case_id = :case_id, @report_inst = :report_inst" arguments=(("case_id", string),("report_inst", string)) sort="type_id A sequence A " )
WORKS: procedure="1 execute dbo.myprocedure;1 @z_sql_log_flag = :z_sql_log_flag, @case_id = :case_id, @report_inst = :report_inst" arguments=(("z_sql_log_flag", number),("case_id", string),("report_inst", string)) sort="type_id A sequence A " )
I am wondering if this is expected behavior or an issue with the conversion.
Thanks, Tony
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.