Hi all,
Inserted an ASP.NET Gridview on page with edit ability to update an Access database. When I go to make edit, no error message occurs, it just doesn't update records in the .mdb file at all. Even tried with SQL Server vs. Access. Same problem.
However, it updates perfectly on localhost. Problem is only on web hosts. Tried different hosts and problem is the same with all of them. Directory and database file permissions on hosts were checked and are not the problem. Code was generated by VS2005.
Live page here:
http://www.dickanddeedee.com/pwdtest.aspx
Try changing any of the passwords and you'll see what I mean.
Anyone have any ideas as to what is going on? It seems like a javascript problem from asp.net 2.0? Code from page is below.
Thanks in advance,
Christopher
<%@ Page Language="
VB" CodeFile="pwdtest.aspx.
vb" Inherits="pwdtest" %>
<% @Import Namespace="System.Data.OleDb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form name="form1" id="form1" runat="server">
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:apdtConnectionString %>"
DeleteCommand="DELETE FROM [AdminAccess] WHERE [ID] = @original_ID" InsertCommand="INSERT INTO [AdminAccess] ([Password], [Active]) VALUES (@Password, @Active)"
SelectCommand="SELECT [ID], [Password], [Active] FROM [AdminAccess]" UpdateCommand="UPDATE [AdminAccess] SET [Password] = @Password, [Active] = @Active WHERE [ID] = @original_ID">
<DeleteParameters>
<asp:Parameter Name="original_ID" Type="Int32" />
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Active" Type="Boolean" />
<asp:Parameter Name="original_ID" Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="Password" Type="String" />
<asp:Parameter Name="Active" Type="Boolean" />
</InsertParameters>
</asp:SqlDataSource>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:CommandField ShowEditButton="True" />
<asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
SortExpression="ID" />
<asp:BoundField DataField="Password" HeaderText="Password" SortExpression="Password" />
<asp:CheckBoxField DataField="Active" HeaderText="Active" SortExpression="Active" />
</Columns>
</asp:GridView>
</form>
</body>
</html>