[thelist] ASP.NET DataGrid Edit/Update problem

Rikter Web Design support at rikter.com
Tue Jan 31 16:01:34 CST 2006

Hi all,

Tearing hair out over this one.  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, just doesn't update records at all.

Works perfectly on localhost.  Problem is only when on web hosts, but tried
two different hosts and problem is the same with both.  Permissions on hosts
were checked.

Live page here: http://www.dickanddeedee.com/pwdtest.aspx

Try changing any of the passwords and you'll see what I mean.



<%@ Page Language="VB" %>


<script runat="server">

    Protected Sub AccessDataSource1_Selecting(ByVal sender As Object, ByVal
e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs)

    End Sub

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:AccessDataSource ID="AccessDataSource1" runat="server"
            DeleteCommand="DELETE FROM [AdminAccess] WHERE [ID] = ?"
InsertCommand="INSERT INTO [AdminAccess] ([ID], [Password], [Active]) VALUES
(?, ?, ?)"
            SelectCommand="SELECT [ID], [Password], [Active] FROM
[AdminAccess] WHERE ([AccessLevel] = ?)"
            UpdateCommand="UPDATE [AdminAccess] SET [Password] = ?, [Active]
= ? WHERE [ID] = ?" OnSelecting="AccessDataSource1_Selecting">
                <asp:Parameter Name="original_ID" Type="Int32" />
                <asp:Parameter Name="Password" Type="String" />
                <asp:Parameter Name="Active" Type="Boolean" />
                <asp:Parameter Name="original_ID" Type="Int32" />
                <asp:Parameter DefaultValue="2" Name="AccessLevel"
Type="Int32" />
                <asp:Parameter Name="ID" Type="Int32" />
                <asp:Parameter Name="Password" Type="String" />
                <asp:Parameter Name="Active" Type="Boolean" />
        <asp:GridView ID="GridView1" runat="server" AllowSorting="True"
            DataKeyNames="ID" DataSourceID="AccessDataSource1">
                <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" />

More information about the thelist mailing list