0

Hello.
I have a gridview with an ImageButton that acts as an Update Command to a DataSource.
and the SP works if i execute it in the server with parameters, but not through the ImageButton.

I Suspect that the Parameters arn't bein sent because if i set a Default Value
that update function works perfectly.
the SP adds the parameters to a string and being executed as a query.
(1 parameter is a column name)

This is The DataSource:

<asp:SqlDataSource ID="sds_view" runat="server" ConnectionString= ( connection string here)
SelectCommand="spView" SelectCommandType="StoredProcedure" UpdateCommand="spAccept" UpdateCommandType="StoredProcedure">
<UpdateParameters>
<asp:Parameter Name="ID" Type"String" />
<asp:Parameter Name="TotalDays" Type"Int32" />
<asp:Parameter Name="RequestType" Type"String" />
<asp:Parameter Name="Num" Type"Int32" />

</UpdateParameters>

i manualy wrote the code so didn't write a deletecommand as well,
the delete works perfectly and written the same way.

GridView :

<anthem:GridView ID="GridViewRequests" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" DataSourceID="sds_view" DataKeyNames="ID,TotalDays,RequestType,Num" CellPadding="4" GridLines="Vertical" PageSize="25" AutoUpdateAfterCallBack="True" UpdateAfterCallBack="True">

Google has failed me so i come to you in a plea.

Thanks in advance,
Eric

2
Contributors
2
Replies
4
Views
6 Years
Discussion Span
Last Post by EricIskhakov
0

No the parameters are BoundFields from the gridview.
and i don't use a edit button,
i am not trying to update the current column i am only using the command as update
while the SP is updating a whole other Table.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.