Hi,
Delete is working fine for me, but Update- Nothing is happening. Please find the code snippet below and help me out...
Any help would be appreciated....
thnks in advance...
Delete is working fine for me, but Update- Nothing is happening. Please find the code snippet below and help me out...
Code:
<asp:GridView ID="empGrid" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="empTestDataSource" > <Columns> <asp:ButtonField CommandName="Select" ButtonType=Link DataTextField="empId" /> <asp:BoundField DataField="empName" HeaderText="empName" SortExpression="empName" /> <asp:BoundField DataField="empAge" HeaderText="empAge" SortExpression="empAge" /> <asp:CommandField ShowEditButton=true ButtonType=Button /> <asp:CommandField ShowDeleteButton=true ButtonType=Button /> </Columns> </asp:GridView> <asp:AccessDataSource ID="empTestDataSource" runat="server" DataFile="~/Database/Employee.mdb" SelectCommand="SELECT [empName], [empAge], [empId] FROM [emp]" UpdateCommand="UPDATE emp SET empName=@empName WHERE empId=@empId" DeleteCommand="DELETE FROM emp WHERE empId=@empId" OldValuesParameterFormatString="{0}"> <UpdateParameters> <asp:Parameter Name="empName" Type=string /> <asp:Parameter Name="empId" Type=Int32 /> </UpdateParameters> </asp:AccessDataSource>
thnks in advance...
Comment