XModPro

Form SelectCommand Stored Procedure Parameters not working

Phillip Austin Phillip Austin asked Jul 10, 2014
Active Dec 22 · Viewed 2818 times
<p>In an AddForm I am unable to call a stored procedure in a Select Command as commandtype="storedprocedure" as follows:</p><p>&lt;SelectCommand<br> CommandText="GetAddCodeChangeDefaults"<br> CommandType="StoredProcedure"<br> ConnectionString="***" &gt;<br> &lt;Parameter Name="LoggedOnUserID" Value='[[User:ID]]' DataType="Int32" Size="100"/&gt;<br> &lt;/SelectCommand&gt;</p><p>The above throws an error stating that the Parameter was not supplied.&nbsp; I have successfully used the same syntax in list data sources and submit commands.</p><p>However the following does work:</p><p>&lt;SelectCommand<br> CommandText="GetAddCodeChangeDefaults @LoggedOnUserID"<br> ConnectionString="***" &gt;<br> &lt;Parameter Name="LoggedOnUserID" Value='[[User:ID]]' DataType="Int32" Size="100"/&gt;<br> &lt;/SelectCommand&gt;</p><p>I am running XMP 4.5 and DNN7.1</p>

3 Answers

Loading answers...