Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 23rd, 2006, 11:10 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default my Grazy GridView... help

Hi All

I am using Visual Studio 2005, I have a problem with my GridView.

I have one access .mdb table and when I update a record on the table EVERYTHING is perfect. I made a Web Setup Project and installed My Web Application on my Localhost and it works perfectly.

When I install My Web Application on our “Production Server” it just doesn’t update the records on Edit mode!!!

I open the table with Access, update the records manually, and refresh… the GridView is updated and cached my manual changes?

I tried to add ALL Users and grant Full Control on the Security Tab of the used table, NO WAY, it didn’t help!!

No errors no messages, just doesn’t update the records.

Any help please ???


No code behind code, Here is my “default.aspx”…

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!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>Welcome to Availibility Form</title>
</head>
<body>
<script type="text/javascript" language="JavaScript1.2">
<!--
//HV Menu- by Ger Versluis (http://www.burmees.nl/)
//Submitted to Dynamic Drive (http://www.dynamicdrive.com)
//Visit http://www.dynamicdrive.com for this script and more

function Go(){return}
// -->
</script>

<script type="text/javascript" src="exmplmenu_var.js"></script>
<script type="text/javascript" src="menu_com.js"></script>

<noscript>
  Your browser does not support script
</noscript>

<SCRIPT Language=VBScript>
  function VisDato
    dim Dag, TheDato, nu
    nu = now
    Dag = WeekdayName(Weekday(nu, vbUseSystemDayOfWeek), false, vbUseSystemDayOfWeek)
    TheDato = Dag & ", " & FormatDateTime(nu, vbLongDate)
    TheDato = replace(TheDato, Dag & ", " & Dag, Dag)
    dato.innerText = TheDato
  end function
</SCRIPT>

<br>
<table class="maintable" width=820 border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="white">
    <tr>
        <td bgcolor="white" align="left"><img src="logo_one_line.gif"></td>

        <td align=right bgcolor="white">
          <table border="0" cellspacing="0" cellpadding="0">
            <tr><td>Welcome 7TM Empolyee</td></tr>
            <tr><td align="center"><span id=dato></span></td></tr>
          </table>
        </td>
        <TD>&nbsp;</TD>
        <TD align=right><a href="http://www.dmi.dk/dmi/index/danmark.htm"
      title="Weather forecast. Click to see weather in details."><img
      border="0" src="http://glwww.dmi.dk/vejr/landsudsigter/1day.gif"></a></TD>
    </tr>
</table>

<SCRIPT LANGUAGE=VBScript>
  VisDato
  setInterval "VisDato", 10000, "VBScript"
</SCRIPT>

    <form id="form1" runat="server">
    <div>
        <table align="center">
            <tr>
                <td style="height: 77px; width: 800px;" align="left">
                    <strong><span style="text-decoration: underline" contenteditable="false">Welcome to the Availability Form</span></strong>&nbsp;<br />
                </td>
            </tr>
            <tr>
                <td style="height: 63px; width: 800px; text-align: left;" align="left">
                    <span style="font-size: 10pt; font-family: Arial">Please click on the <strong><span
                        style="text-decoration: underline"><span style="color: blue">Edit</span> </span>
                    </strong>link beside your name to start editing your <strong>Availability</strong> Status
                        and select the <strong>Dates </strong>and <strong>Times </strong>of your <strong>Leaving
                        </strong>and <strong>Return</strong>, and then click <strong>Update</strong>.&nbsp;</span></td>
            </tr>
            <tr>
                <td style="height: 104px; width: 800px;">
                    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                        BackColor="#73A3D3" DataKeyNames="ID" DataSourceID="AccessDataSource1" EmptyDataText="There are no data records to display."
                        Font-Size="Medium" Width="800px">
                        <Columns>
                            <asp:CommandField ShowEditButton="True" />
                            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
                            <asp:BoundField DataField="Department" HeaderText="Department" SortExpression="Department" />
                            <asp:BoundField DataField="Availability" HeaderText="Availability" SortExpression="Availability" />
                            <asp:BoundField DataField="LeaveDate" HeaderText="Leave Date" SortExpression="LeaveDate" />
                            <asp:TemplateField HeaderText="Leave Time" SortExpression="LeaveTime">
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("LeaveTime") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind("LeaveTime") %>'>
                                        <asp:ListItem Selected="True"></asp:ListItem>
                                        <asp:ListItem>All Day</asp:ListItem>
                                        <asp:ListItem>08:00</asp:ListItem>
                                        <asp:ListItem>09:00</asp:ListItem>
                                        <asp:ListItem>10:00</asp:ListItem>
                                        <asp:ListItem>11:00</asp:ListItem>
                                        <asp:ListItem>12:00</asp:ListItem>
                                        <asp:ListItem>13:00</asp:ListItem>
                                        <asp:ListItem>14:00</asp:ListItem>
                                        <asp:ListItem>15:00</asp:ListItem>
                                        <asp:ListItem>16:00</asp:ListItem>
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="ReturnDate" HeaderText="Return Date" SortExpression="ReturnDate" />
                            <asp:TemplateField HeaderText="Return Time" SortExpression="ReturnTime">
                                <ItemTemplate>
                                    <asp:Label ID="Label2" runat="server" Text='<%# Bind("ReturnTime") %>'></asp:Label>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:DropDownList ID="DropDownList2" runat="server" SelectedValue='<%# Bind("ReturnTime") %>'>
                                        <asp:ListItem Selected="True"></asp:ListItem>
                                        <asp:ListItem>All Day</asp:ListItem>
                                        <asp:ListItem>09:00</asp:ListItem>
                                        <asp:ListItem>10:00</asp:ListItem>
                                        <asp:ListItem>11:00</asp:ListItem>
                                        <asp:ListItem>12:00</asp:ListItem>
                                        <asp:ListItem>13:00</asp:ListItem>
                                        <asp:ListItem>14:00</asp:ListItem>
                                        <asp:ListItem>15:00</asp:ListItem>
                                        <asp:ListItem>16:00</asp:ListItem>
                                        <asp:ListItem>17:00</asp:ListItem>
                                    </asp:DropDownList>
                                </EditItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle BackColor="#80B6EC" />
                        <RowStyle Wrap="False" />
                    </asp:GridView>
                    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="App_Data\who_is_who_available.mdb"
                        DeleteCommand="DELETE FROM [who_is_who_available] WHERE [ID] = ?" InsertCommand="INSERT INTO [who_is_who_available] ([ID], [Name], [Title], [Department], [Availability], [LeaveDate], [LeaveTime], [ReturnDate], [ReturnTime], [Init]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
                        SelectCommand="SELECT * FROM [who_is_who_available] ORDER BY [Department], [Name]"
                        UpdateCommand="UPDATE [who_is_who_available] SET [Name] = ?, [Title] = ?, [Department] = ?, [Availability] = ?, [LeaveDate] = ?, [LeaveTime] = ?, [ReturnDate] = ?, [ReturnTime] = ?, [Init] = ? WHERE [ID] = ?">
                        <DeleteParameters>
                            <asp:Parameter Name="original_ID" Type="Int32" />
                        </DeleteParameters>
                        <UpdateParameters>
                            <asp:Parameter Name="Name" Type="String" />
                            <asp:Parameter Name="Title" Type="String" />
                            <asp:Parameter Name="Department" Type="String" />
                            <asp:Parameter Name="Availability" Type="String" />
                            <asp:Parameter Name="LeaveDate" Type="String" />
                            <asp:Parameter Name="LeaveTime" Type="String" />
                            <asp:Parameter Name="ReturnDate" Type="String" />
                            <asp:Parameter Name="ReturnTime" Type="String" />
                            <asp:Parameter Name="Init" Type="String" />
                            <asp:Parameter Name="original_ID" Type="Int32" />
                        </UpdateParameters>
                        <InsertParameters>
                            <asp:Parameter Name="ID" Type="Int32" />
                            <asp:Parameter Name="Name" Type="String" />
                            <asp:Parameter Name="Title" Type="String" />
                            <asp:Parameter Name="Department" Type="String" />
                            <asp:Parameter Name="Availability" Type="String" />
                            <asp:Parameter Name="LeaveDate" Type="String" />
                            <asp:Parameter Name="LeaveTime" Type="String" />
                            <asp:Parameter Name="ReturnDate" Type="String" />
                            <asp:Parameter Name="ReturnTime" Type="String" />
                            <asp:Parameter Name="Init" Type="String" />
                        </InsertParameters>
                    </asp:AccessDataSource>
                </td>
            </tr>
            <tr>
                <td align="center" style="height: 60px; width: 800px;">
                    ©2006 7TM Pharma. All All rights reserved.
                </td>
            </tr>
        </table>

    </div>
    </form>
</body>
</html>


 
Old March 4th, 2006, 06:14 AM
Registered User
 
Join Date: Mar 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

helloooooo

why this is still without answer... where are the microsoft gurus!
Aws





Similar Threads
Thread Thread Starter Forum Replies Last Post
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
Gridview user007 ASP.NET 2.0 Basics 2 June 22nd, 2008 09:30 AM
Gridview 2.0 holaman ASP.NET 2.0 Basics 2 November 7th, 2007 03:02 AM
Gridview Thinlizzy ASP.NET 2.0 Basics 2 July 20th, 2007 08:33 AM
GridView heba ASP.NET 2.0 Professional 0 May 28th, 2007 01:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.