J
jkeel
If I try to Update a record with the following code using a stored
procedure I get an error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:stellentConnectionString %>"
SelectCommand="spWC_Adjusters"
SelectCommandType="StoredProcedure"
InsertCommand="spWC_Adjusters_Insert "
InsertCommandType="StoredProcedure"
UpdateCommand="spWC_Adjusters_Update"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="A"
Name="Adj_Sup" Type="String" />
<asp:ControlParameter ControlID="GridView1"
DefaultValue="%" Name="Adj_Sup_Num" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<UpdateParameters>
<asparameter Name="Unit" Type="String" />
<asparameter Name="Sup_Adj_No"
Type="String" />
<asparameter Name="Sup_Adj_Ind"
Type="String" />
<asparameter Name="extension"
Type="String" />
<asparameter Name="User_id" Type="String"
/>
<asparameter Name="Fname" Type="String"
/>
<asparameter Name="Lname" Type="String"
/>
<asparameter Name="Email" Type="String"
/>
<asparameter Name="Designation"
Type="String" />
<asparameter Name="Adj_Type"
Type="String" />
<asparameter Name="Title" Type="String"
/>
<asparameter Name="Queue" Type="String"
/>
<asparameter Name="Sup_No" Type="String"
/>
<asparameter Direction="ReturnValue"
Name="RETURN_VALUE" Type="Int32" />
</UpdateParameters>
I get the error:
Procedure or function spWC_Adjusters_Insert has too many arguments
specified
So then I try to pass in the arguments for the stored procedure, but
then I get another error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:stellentConnectionString %>"
SelectCommand="spWC_Adjusters"
SelectCommandType="StoredProcedure"
InsertCommand="spWC_Adjusters_Insert "
InsertCommandType="StoredProcedure"
UpdateCommand="spWC_Adjusters_Update @Unit, @Sup_Adj_No"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="A"
Name="Adj_Sup" Type="String" />
<asp:ControlParameter ControlID="GridView1"
DefaultValue="%" Name="Adj_Sup_Num" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<UpdateParameters>
<asparameter Name="Unit" Type="String" />
<asparameter Name="Sup_Adj_No"
Type="String" />
<asparameter Name="Sup_Adj_Ind"
Type="String" />
<asparameter Name="extension"
Type="String" />
<asparameter Name="User_id" Type="String"
/>
<asparameter Name="Fname" Type="String"
/>
<asparameter Name="Lname" Type="String"
/>
<asparameter Name="Email" Type="String"
/>
<asparameter Name="Designation"
Type="String" />
<asparameter Name="Adj_Type"
Type="String" />
<asparameter Name="Title" Type="String"
/>
<asparameter Name="Queue" Type="String"
/>
<asparameter Name="Sup_No" Type="String"
/>
<asparameter Direction="ReturnValue"
Name="RETURN_VALUE" Type="Int32" />
</UpdateParameters>
I get the error:
Could not find stored procedure 'spWC_Adjusters_Insert @Unit,
@Sup_Adj_no'.
What gives??????? How can I pass the parameters to the stored
procedure??
procedure I get an error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:stellentConnectionString %>"
SelectCommand="spWC_Adjusters"
SelectCommandType="StoredProcedure"
InsertCommand="spWC_Adjusters_Insert "
InsertCommandType="StoredProcedure"
UpdateCommand="spWC_Adjusters_Update"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="A"
Name="Adj_Sup" Type="String" />
<asp:ControlParameter ControlID="GridView1"
DefaultValue="%" Name="Adj_Sup_Num" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<UpdateParameters>
<asparameter Name="Unit" Type="String" />
<asparameter Name="Sup_Adj_No"
Type="String" />
<asparameter Name="Sup_Adj_Ind"
Type="String" />
<asparameter Name="extension"
Type="String" />
<asparameter Name="User_id" Type="String"
/>
<asparameter Name="Fname" Type="String"
/>
<asparameter Name="Lname" Type="String"
/>
<asparameter Name="Email" Type="String"
/>
<asparameter Name="Designation"
Type="String" />
<asparameter Name="Adj_Type"
Type="String" />
<asparameter Name="Title" Type="String"
/>
<asparameter Name="Queue" Type="String"
/>
<asparameter Name="Sup_No" Type="String"
/>
<asparameter Direction="ReturnValue"
Name="RETURN_VALUE" Type="Int32" />
</UpdateParameters>
I get the error:
Procedure or function spWC_Adjusters_Insert has too many arguments
specified
So then I try to pass in the arguments for the stored procedure, but
then I get another error:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:stellentConnectionString %>"
SelectCommand="spWC_Adjusters"
SelectCommandType="StoredProcedure"
InsertCommand="spWC_Adjusters_Insert "
InsertCommandType="StoredProcedure"
UpdateCommand="spWC_Adjusters_Update @Unit, @Sup_Adj_No"
UpdateCommandType="StoredProcedure">
<SelectParameters>
<asparameter DefaultValue="A"
Name="Adj_Sup" Type="String" />
<asp:ControlParameter ControlID="GridView1"
DefaultValue="%" Name="Adj_Sup_Num" PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
<UpdateParameters>
<asparameter Name="Unit" Type="String" />
<asparameter Name="Sup_Adj_No"
Type="String" />
<asparameter Name="Sup_Adj_Ind"
Type="String" />
<asparameter Name="extension"
Type="String" />
<asparameter Name="User_id" Type="String"
/>
<asparameter Name="Fname" Type="String"
/>
<asparameter Name="Lname" Type="String"
/>
<asparameter Name="Email" Type="String"
/>
<asparameter Name="Designation"
Type="String" />
<asparameter Name="Adj_Type"
Type="String" />
<asparameter Name="Title" Type="String"
/>
<asparameter Name="Queue" Type="String"
/>
<asparameter Name="Sup_No" Type="String"
/>
<asparameter Direction="ReturnValue"
Name="RETURN_VALUE" Type="Int32" />
</UpdateParameters>
I get the error:
Could not find stored procedure 'spWC_Adjusters_Insert @Unit,
@Sup_Adj_no'.
What gives??????? How can I pass the parameters to the stored
procedure??