I am using Visual Web Developer 2008 and SQL Server 2005. I am trying to set up a autonumber type of incrementation as I had done with MS Acess
I keep getting the error:
Cannot insert explicit value for identity column in table 'ApcToDo' when IDENTITY_INSERT is set to OFF.
I am not sure where I turn this on or if I need to it to my code manually somewhere.
Here is the code from my project.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#form1
{
height: 1030px;
width: 970px;
margin-left: 0px;
}
#form2
{
height: 1027px;
}
.style1
{
width: 100%;
}
.style2
{
width: 905px;
}
.style3
{
width: 61px;
}
.style4
{
width: 63px;
}
.style5
{
width: 870px;
}
.style6
{
width: 850px;
}
</style>
</head>
<body style="text-align: center">
<form id="form1" runat="server">
<div>
<h1 style="text-align: center">
Apc To Do</h1>
</div>
<asp:SqlDataSource ID="dlpastelconnect" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:dlpastel %>"
DeleteCommand="DELETE FROM [ApcToDo] WHERE [Id] = @original_Id AND [DateIn] = @original_DateIn AND [Complaint] = @original_Complaint AND [ComplaintDetails] = @original_ComplaintDetails AND [Importance] = @original_Importance AND [EntBy] = @original_EntBy AND [Status] = @original_Status AND [DateComplete] = @original_DateComplete AND [Solution] = @original_Solution AND [OkDan] = @original_OkDan AND [OkCheryl] = @original_OkCheryl AND [OkDale] = @original_OkDale AND [OkWes] = @original_OkWes AND [Notes] = @original_Notes AND [Version] = @original_Version AND [VersionDate] = @original_VersionDate AND [PromptChanges] = @original_PromptChanges"
InsertCommand="INSERT INTO [ApcToDo] ([DateIn], [Complaint], [ComplaintDetails], [Importance], [EntBy], [Status], [DateComplete], [Solution], [OkDan], [OkCheryl], [OkDale], [OkWes], [Notes], [Version], [VersionDate], [PromptChanges], [Id]) VALUES (@DateIn, @Complaint, @ComplaintDetails, @Importance, @EntBy, @Status, @DateComplete, @Solution, @OkDan, @OkCheryl, @OkDale, @OkWes, @Notes, @Version, @VersionDate, @PromptChanges, @Id)"
SelectCommand="SELECT * FROM [ApcToDo]"
UpdateCommand="UPDATE [ApcToDo] SET [DateIn] = @DateIn, [Complaint] = @Complaint, [ComplaintDetails] = @ComplaintDetails, [Importance] = @Importance, [EntBy] = @EntBy, [Status] = @Status, [DateComplete] = @DateComplete, [Solution] = @Solution, [OkDan] = @OkDan, [OkCheryl] = @OkCheryl, [OkDale] = @OkDale, [OkWes] = @OkWes, [Notes] = @Notes, [Version] = @Version, [VersionDate] = @VersionDate, [PromptChanges] = @PromptChanges WHERE [Id] = @original_Id AND [DateIn] = @original_DateIn AND [Complaint] = @original_Complaint AND [ComplaintDetails] = @original_ComplaintDetails AND [Importance] = @original_Importance AND [EntBy] = @original_EntBy AND [Status] = @original_Status AND [DateComplete] = @original_DateComplete AND [Solution] = @original_Solution AND [OkDan] = @original_OkDan AND [OkCheryl] = @original_OkCheryl AND [OkDale] = @original_OkDale AND [OkWes] = @original_OkWes AND [Notes] = @original_Notes AND [Version] = @original_Version AND [VersionDate] = @original_VersionDate AND [PromptChanges] = @original_PromptChanges"
OldValuesParameterFormatString="original_{0}"
UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asparameter Name="original_Id" Type="Int32" />
<asparameter Name="original_DateIn" Type="DateTime" />
<asparameter Name="original_Complaint" Type="String" />
<asparameter Name="original_ComplaintDetails" Type="String" />
<asparameter Name="original_Importance" Type="Int32" />
<asparameter Name="original_EntBy" Type="String" />
<asparameter Name="original_Status" Type="String" />
<asparameter Name="original_DateComplete" Type="DateTime" />
<asparameter Name="original_Solution" Type="String" />
<asparameter Name="original_OkDan" Type="String" />
<asparameter Name="original_OkCheryl" Type="DateTime" />
<asparameter Name="original_OkDale" Type="String" />
<asparameter Name="original_OkWes" Type="String" />
<asparameter Name="original_Notes" Type="String" />
<asparameter Name="original_Version" Type="String" />
<asparameter Name="original_VersionDate" Type="DateTime" />
<asparameter Name="original_PromptChanges" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asparameter Name="DateIn" Type="DateTime" />
<asparameter Name="Complaint" Type="String" />
<asparameter Name="ComplaintDetails" Type="String" />
<asparameter Name="Importance" Type="Int32" />
<asparameter Name="EntBy" Type="String" />
<asparameter Name="Status" Type="String" />
<asparameter Name="DateComplete" Type="DateTime" />
<asparameter Name="Solution" Type="String" />
<asparameter Name="OkDan" Type="String" />
<asparameter Name="OkCheryl" Type="DateTime" />
<asparameter Name="OkDale" Type="String" />
<asparameter Name="OkWes" Type="String" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Version" Type="String" />
<asparameter Name="VersionDate" Type="DateTime" />
<asparameter Name="PromptChanges" Type="String" />
<asparameter Name="original_Id" Type="Int32" />
<asparameter Name="original_DateIn" Type="DateTime" />
<asparameter Name="original_Complaint" Type="String" />
<asparameter Name="original_ComplaintDetails" Type="String" />
<asparameter Name="original_Importance" Type="Int32" />
<asparameter Name="original_EntBy" Type="String" />
<asparameter Name="original_Status" Type="String" />
<asparameter Name="original_DateComplete" Type="DateTime" />
<asparameter Name="original_Solution" Type="String" />
<asparameter Name="original_OkDan" Type="String" />
<asparameter Name="original_OkCheryl" Type="DateTime" />
<asparameter Name="original_OkDale" Type="String" />
<asparameter Name="original_OkWes" Type="String" />
<asparameter Name="original_Notes" Type="String" />
<asparameter Name="original_Version" Type="String" />
<asparameter Name="original_VersionDate" Type="DateTime" />
<asparameter Name="original_PromptChanges" Type="String" />
</UpdateParameters>
<InsertParameters>
<asparameter Name="DateIn" Type="DateTime" />
<asparameter Name="Complaint" Type="String" />
<asparameter Name="ComplaintDetails" Type="String" />
<asparameter Name="Importance" Type="Int32" />
<asparameter Name="EntBy" Type="String" />
<asparameter Name="Status" Type="String" />
<asparameter Name="DateComplete" Type="DateTime" />
<asparameter Name="Solution" Type="String" />
<asparameter Name="OkDan" Type="String" />
<asparameter Name="OkCheryl" Type="DateTime" />
<asparameter Name="OkDale" Type="String" />
<asparameter Name="OkWes" Type="String" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Version" Type="String" />
<asparameter Name="VersionDate" Type="DateTime" />
<asparameter Name="PromptChanges" Type="String" />
<asparameter Name="Id" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<table class="style1">
<tr>
<td>
</td>
<td class="style2">
<asp:GridView ID="ToDoGrid" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" BackColor="#CCCCCC"
BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4"
CellSpacing="2" DataKeyNames="Id" DataSourceID="dlpastelconnect"
ForeColor="Black" PageSize="4" style="text-align: center">
<FooterStyle BackColor="#CCCCCC" />
<RowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="DateIn" HeaderText="Date In"
SortExpression="DateIn" />
<asp:BoundField DataField="Complaint" HeaderText="Complaint"
SortExpression="Complaint" />
<asp:BoundField DataField="Importance" HeaderText="Importance"
SortExpression="Importance" />
<asp:BoundField DataField="EntBy" HeaderText="Ent By" SortExpression="EntBy" />
<asp:BoundField DataField="Status" HeaderText="Status"
SortExpression="Status" />
<asp:BoundField DataField="DateComplete" HeaderText="Date Complete"
SortExpression="DateComplete" />
<asp:BoundField DataField="OkCheryl" HeaderText="Ok Cheryl"
SortExpression="OkCheryl" />
<asp:BoundField DataField="OkDale" HeaderText="Ok Dale"
SortExpression="OkDale" />
<asp:CommandField ShowSelectButton="True" />
</Columns>
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<br />
</td>
<td>
<br />
<br />
</td>
</tr>
</table>
<table class="style1">
<tr>
<td class="style4">
</td>
<td class="style5">
<h1 style="width: 831px">
Details</h1>
</td>
<td>
</td>
</tr>
</table>
<table class="style1">
<tr>
<td class="style3">
<br />
</td>
<td style="text-align: left" class="style6">
<asp:FormView ID="ToDoDetailForm" runat="server"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
CellPadding="2" DataKeyNames="Id" DataSourceID="dlpastelconnect"
ForeColor="Black" Width="970px" Height="241px">
<FooterStyle BackColor="Tan" />
<EditItemTemplate>
Date In: <asp:TextBox ID="DateInTextBox" runat="server" Text='<%# Bind("DateIn") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
BackColor="Yellow" ControlToValidate="DateInTextBox"
ErrorMessage="Date In May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
EntBy:
<asp:TextBox ID="EntByTextBox" runat="server" Text='<%# Bind("EntBy") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BackColor="Yellow" ControlToValidate="EntByTextBox"
ErrorMessage="Ent By Must Not Be Blank" Font-Bold="True">!</asp:RequiredFieldValidator>
Importance:
<asp:TextBox ID="ImportanceTextBox" runat="server"
Text='<%# Bind("Importance") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
BackColor="Yellow" ControlToValidate="ImportanceTextBox"
ErrorMessage="Importance Can Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Status:
<asp:TextBox ID="StatusTextBox" runat="server" Text='<%# Bind("Status") %>'
Height="24px" Width="130px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
BackColor="Yellow" ErrorMessage="Status May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Complaint:
<asp:TextBox ID="ComplaintTextBox" runat="server" Height="22px"
Text='<%# Bind("Complaint") %>' Width="770px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BackColor="Yellow" ControlToValidate="ComplaintTextBox"
ErrorMessage="Complaint May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Details :
<asp:TextBox ID="ComplaintDetailsTextBox" runat="server" Height="69px"
Text='<%# Bind("ComplaintDetails") %>' Width="771px"
style="text-align: left" TextMode="MultiLine" />
<br />
<br />
Notes:
<asp:TextBox ID="NotesTextBox" runat="server" Height="87px"
Text='<%# Bind("Notes") %>' TextMode="MultiLine"
Width="774px" />
<br />
Date<br />
Complete:
<asp:TextBox ID="DateCompleteTextBox" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<br />
Solution:
<asp:TextBox ID="SolutionTextBox" runat="server" Height="86px"
Text='<%# Bind("Solution") %>' Width="771px" TextMode="MultiLine" />
<br />
<br />
Ok Dan:
<asp:TextBox ID="OkDanTextBox" runat="server" Text='<%# Bind("OkDan") %>' />
Ok Cheryl:
<asp:TextBox ID="OkCherylTextBox" runat="server"
Text='<%# Bind("OkCheryl") %>' />
Ok Dale:
<asp:TextBox ID="OkDaleTextBox" runat="server" Text='<%# Bind("OkDale") %>' />
OkWes:
<asp:TextBox ID="OkWesTextBox" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<br />
Version:
<asp:TextBox ID="VersionTextBox" runat="server" Text='<%# Bind("Version") %>' />
VersionDate:
<asp:TextBox ID="VersionDateTextBox" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<br />
Prompt Changes: <br />
<asp:TextBox
ID="PromptChangesTextBox" runat="server"
Height="62px" Text='<%# Bind("PromptChanges") %>' Width="792px"
TextMode="MultiLine" />
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
BackColor="White" Width="858px" />
<br />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Save" BackColor="White" BorderStyle="Groove" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel"
BackColor="White" BorderStyle="Groove" />
<br />
<br />
</EditItemTemplate>
<InsertItemTemplate>
DateIn:
<asp:TextBox ID="DateInTextBox0" runat="server" Text='<%# Bind("DateIn") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="DateInTextBox0" ErrorMessage="Date In May Not Be Empty"
BackColor="Yellow" Font-Bold="True">!</asp:RequiredFieldValidator>
EntBy:
<asp:TextBox ID="EntByTextBox0" runat="server" Text='<%# Bind("EntBy") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
BackColor="Yellow" ControlToValidate="EntByTextBox0"
ErrorMessage="Ent By May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Importance:
<asp:TextBox ID="ImportanceTextBox0" runat="server"
Text='<%# Bind("Importance") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server"
BackColor="Yellow" ControlToValidate="ImportanceTextBox0"
ErrorMessage="Importance Must Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Status:
<asp:TextBox ID="StatusTextBox0" runat="server" Text='<%# Bind("Status") %>'
/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
ErrorMessage="Status May Not Be Empty" BackColor="Yellow"
ControlToValidate="StatusTextBox0" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Complaint:
<asp:TextBox ID="ComplaintTextBox0" runat="server" Height="18px"
Text='<%# Bind("Complaint") %>' Width="725px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="ComplaintTextBox0"
ErrorMessage="Complaint May Not Be Empty" BackColor="Yellow" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Details:
<asp:TextBox ID="ComplaintDetailsTextBox0" runat="server" Height="48px"
Text='<%# Bind("ComplaintDetails") %>' Width="727px"
TextMode="MultiLine" />
<br />
<br />
Notes:
<asp:TextBox ID="NotesTextBox0" runat="server" Height="52px"
style="margin-left: 0px"
Text='<%# Bind("Notes") %>' TextMode="MultiLine"
Width="724px" />
<br />
Date
<br />
Complete:
<asp:TextBox ID="DateCompleteTextBox0" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<br />
Solution:
<asp:TextBox ID="SolutionTextBox0" runat="server" Height="56px"
Text='<%# Bind("Solution") %>' Width="736px" TextMode="MultiLine" />
<br />
<br />
Ok Dan:
<asp:TextBox ID="OkDanTextBox0" runat="server" Text='<%# Bind("OkDan") %>' />
Ok Cheryl:
<asp:TextBox ID="OkCherylTextBox0" runat="server"
Text='<%# Bind("OkCheryl") %>' />
Ok Dale:
<asp:TextBox ID="OkDaleTextBox0" runat="server" Text='<%# Bind("OkDale") %>' />
OkWes:
<asp:TextBox ID="OkWesTextBox0" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<br />
Version:
<asp:TextBox ID="VersionTextBox0" runat="server"
Text='<%# Bind("Version") %>' />
Version Date:
<asp:TextBox ID="VersionDateTextBox0" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<br />
Prompt
<br />
Changes:
<asp:TextBox ID="PromptChangesTextBox0" runat="server" Height="43px"
Text='<%# Bind("PromptChanges") %>' Width="701px" TextMode="MultiLine" />
<br />
<br />
<asp:ValidationSummary ID="ValidationSummary2" runat="server" BackColor="White"
Height="35px" Width="809px" />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Save" BackColor="White" BorderStyle="Outset" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" BackColor="White"
BorderStyle="Outset" />
</InsertItemTemplate>
<ItemTemplate>
<b>Date In:</b>
<asp:Label ID="DateInLabel" runat="server" Text='<%# Bind("DateIn") %>' />
<b>Ent By</b>:
<asp:Label ID="EntByLabel" runat="server" Text='<%# Bind("EntBy") %>' />
<b>Importance:</b>
<asp:Label ID="ImportanceLabel" runat="server"
Text='<%# Bind("Importance") %>' />
<b>Status:</b>
<asp:Label ID="StatusLabel" runat="server" Text='<%# Bind("Status") %>' />
<br />
<b>Complaint:</b>
<asp:Label ID="ComplaintLabel" runat="server" Text='<%# Bind("Complaint") %>' />
<br />
<b>Complaint Details:</b>
<asp:Label ID="ComplaintDetailsLabel" runat="server"
Text='<%# Bind("ComplaintDetails") %>' />
<br />
<b>Notes:</b>
<asp:Label ID="NotesLabel" runat="server" Text='<%# Bind("Notes") %>' />
<br />
<b>Date Complete:</b>
<asp:Label ID="DateCompleteLabel" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<b>Solution:</b>
<asp:Label ID="SolutionLabel" runat="server" Text='<%# Bind("Solution") %>' />
<br />
<b>Ok Dan:</b>
<asp:Label ID="OkDanLabel" runat="server" Text='<%# Bind("OkDan") %>' />
<b>Ok Cheryl:</b>
<asp:Label ID="OkCherylLabel" runat="server" Text='<%# Bind("OkCheryl") %>' />
<b>Ok Dale:</b>
<asp:Label ID="OkDaleLabel" runat="server" Text='<%# Bind("OkDale") %>' />
<b>Ok Wes:</b>
<asp:Label ID="OkWesLabel" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<b>Version:</b>
<asp:Label ID="VersionLabel" runat="server" Text='<%# Bind("Version") %>' />
VersionDate:
<asp:Label ID="VersionDateLabel" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<b>Prompt Changes:</b>
<asp:Label ID="PromptChangesLabel" runat="server"
Text='<%# Bind("PromptChanges") %>' />
<br />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" BorderStyle="Groove" />
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" BackColor="White"
BorderStyle="Groove" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" BackColor="White" BorderStyle="Groove" />
</ItemTemplate>
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<InsertRowStyle BackColor="#339966" />
<EditRowStyle BackColor="#3366FF" ForeColor="GhostWhite" Width="950px" />
</asp:FormView>
</td>
<td>
</td>
</tr>
</table>
</form>
</body>
</html>
Thanks in advance
Dan
I keep getting the error:
Cannot insert explicit value for identity column in table 'ApcToDo' when IDENTITY_INSERT is set to OFF.
I am not sure where I turn this on or if I need to it to my code manually somewhere.
Here is the code from my project.
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
<html xmlns="<head runat="server">
<title>Untitled Page</title>
<style type="text/css">
#form1
{
height: 1030px;
width: 970px;
margin-left: 0px;
}
#form2
{
height: 1027px;
}
.style1
{
width: 100%;
}
.style2
{
width: 905px;
}
.style3
{
width: 61px;
}
.style4
{
width: 63px;
}
.style5
{
width: 870px;
}
.style6
{
width: 850px;
}
</style>
</head>
<body style="text-align: center">
<form id="form1" runat="server">
<div>
<h1 style="text-align: center">
Apc To Do</h1>
</div>
<asp:SqlDataSource ID="dlpastelconnect" runat="server"
ConflictDetection="CompareAllValues"
ConnectionString="<%$ ConnectionStrings:dlpastel %>"
DeleteCommand="DELETE FROM [ApcToDo] WHERE [Id] = @original_Id AND [DateIn] = @original_DateIn AND [Complaint] = @original_Complaint AND [ComplaintDetails] = @original_ComplaintDetails AND [Importance] = @original_Importance AND [EntBy] = @original_EntBy AND [Status] = @original_Status AND [DateComplete] = @original_DateComplete AND [Solution] = @original_Solution AND [OkDan] = @original_OkDan AND [OkCheryl] = @original_OkCheryl AND [OkDale] = @original_OkDale AND [OkWes] = @original_OkWes AND [Notes] = @original_Notes AND [Version] = @original_Version AND [VersionDate] = @original_VersionDate AND [PromptChanges] = @original_PromptChanges"
InsertCommand="INSERT INTO [ApcToDo] ([DateIn], [Complaint], [ComplaintDetails], [Importance], [EntBy], [Status], [DateComplete], [Solution], [OkDan], [OkCheryl], [OkDale], [OkWes], [Notes], [Version], [VersionDate], [PromptChanges], [Id]) VALUES (@DateIn, @Complaint, @ComplaintDetails, @Importance, @EntBy, @Status, @DateComplete, @Solution, @OkDan, @OkCheryl, @OkDale, @OkWes, @Notes, @Version, @VersionDate, @PromptChanges, @Id)"
SelectCommand="SELECT * FROM [ApcToDo]"
UpdateCommand="UPDATE [ApcToDo] SET [DateIn] = @DateIn, [Complaint] = @Complaint, [ComplaintDetails] = @ComplaintDetails, [Importance] = @Importance, [EntBy] = @EntBy, [Status] = @Status, [DateComplete] = @DateComplete, [Solution] = @Solution, [OkDan] = @OkDan, [OkCheryl] = @OkCheryl, [OkDale] = @OkDale, [OkWes] = @OkWes, [Notes] = @Notes, [Version] = @Version, [VersionDate] = @VersionDate, [PromptChanges] = @PromptChanges WHERE [Id] = @original_Id AND [DateIn] = @original_DateIn AND [Complaint] = @original_Complaint AND [ComplaintDetails] = @original_ComplaintDetails AND [Importance] = @original_Importance AND [EntBy] = @original_EntBy AND [Status] = @original_Status AND [DateComplete] = @original_DateComplete AND [Solution] = @original_Solution AND [OkDan] = @original_OkDan AND [OkCheryl] = @original_OkCheryl AND [OkDale] = @original_OkDale AND [OkWes] = @original_OkWes AND [Notes] = @original_Notes AND [Version] = @original_Version AND [VersionDate] = @original_VersionDate AND [PromptChanges] = @original_PromptChanges"
OldValuesParameterFormatString="original_{0}"
UpdateCommandType="StoredProcedure">
<DeleteParameters>
<asparameter Name="original_Id" Type="Int32" />
<asparameter Name="original_DateIn" Type="DateTime" />
<asparameter Name="original_Complaint" Type="String" />
<asparameter Name="original_ComplaintDetails" Type="String" />
<asparameter Name="original_Importance" Type="Int32" />
<asparameter Name="original_EntBy" Type="String" />
<asparameter Name="original_Status" Type="String" />
<asparameter Name="original_DateComplete" Type="DateTime" />
<asparameter Name="original_Solution" Type="String" />
<asparameter Name="original_OkDan" Type="String" />
<asparameter Name="original_OkCheryl" Type="DateTime" />
<asparameter Name="original_OkDale" Type="String" />
<asparameter Name="original_OkWes" Type="String" />
<asparameter Name="original_Notes" Type="String" />
<asparameter Name="original_Version" Type="String" />
<asparameter Name="original_VersionDate" Type="DateTime" />
<asparameter Name="original_PromptChanges" Type="String" />
</DeleteParameters>
<UpdateParameters>
<asparameter Name="DateIn" Type="DateTime" />
<asparameter Name="Complaint" Type="String" />
<asparameter Name="ComplaintDetails" Type="String" />
<asparameter Name="Importance" Type="Int32" />
<asparameter Name="EntBy" Type="String" />
<asparameter Name="Status" Type="String" />
<asparameter Name="DateComplete" Type="DateTime" />
<asparameter Name="Solution" Type="String" />
<asparameter Name="OkDan" Type="String" />
<asparameter Name="OkCheryl" Type="DateTime" />
<asparameter Name="OkDale" Type="String" />
<asparameter Name="OkWes" Type="String" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Version" Type="String" />
<asparameter Name="VersionDate" Type="DateTime" />
<asparameter Name="PromptChanges" Type="String" />
<asparameter Name="original_Id" Type="Int32" />
<asparameter Name="original_DateIn" Type="DateTime" />
<asparameter Name="original_Complaint" Type="String" />
<asparameter Name="original_ComplaintDetails" Type="String" />
<asparameter Name="original_Importance" Type="Int32" />
<asparameter Name="original_EntBy" Type="String" />
<asparameter Name="original_Status" Type="String" />
<asparameter Name="original_DateComplete" Type="DateTime" />
<asparameter Name="original_Solution" Type="String" />
<asparameter Name="original_OkDan" Type="String" />
<asparameter Name="original_OkCheryl" Type="DateTime" />
<asparameter Name="original_OkDale" Type="String" />
<asparameter Name="original_OkWes" Type="String" />
<asparameter Name="original_Notes" Type="String" />
<asparameter Name="original_Version" Type="String" />
<asparameter Name="original_VersionDate" Type="DateTime" />
<asparameter Name="original_PromptChanges" Type="String" />
</UpdateParameters>
<InsertParameters>
<asparameter Name="DateIn" Type="DateTime" />
<asparameter Name="Complaint" Type="String" />
<asparameter Name="ComplaintDetails" Type="String" />
<asparameter Name="Importance" Type="Int32" />
<asparameter Name="EntBy" Type="String" />
<asparameter Name="Status" Type="String" />
<asparameter Name="DateComplete" Type="DateTime" />
<asparameter Name="Solution" Type="String" />
<asparameter Name="OkDan" Type="String" />
<asparameter Name="OkCheryl" Type="DateTime" />
<asparameter Name="OkDale" Type="String" />
<asparameter Name="OkWes" Type="String" />
<asparameter Name="Notes" Type="String" />
<asparameter Name="Version" Type="String" />
<asparameter Name="VersionDate" Type="DateTime" />
<asparameter Name="PromptChanges" Type="String" />
<asparameter Name="Id" Type="Int32" />
</InsertParameters>
</asp:SqlDataSource>
<br />
<table class="style1">
<tr>
<td>
</td>
<td class="style2">
<asp:GridView ID="ToDoGrid" runat="server" AllowPaging="True"
AllowSorting="True" AutoGenerateColumns="False" BackColor="#CCCCCC"
BorderColor="#999999" BorderStyle="Solid" BorderWidth="3px" CellPadding="4"
CellSpacing="2" DataKeyNames="Id" DataSourceID="dlpastelconnect"
ForeColor="Black" PageSize="4" style="text-align: center">
<FooterStyle BackColor="#CCCCCC" />
<RowStyle BackColor="White" />
<Columns>
<asp:BoundField DataField="DateIn" HeaderText="Date In"
SortExpression="DateIn" />
<asp:BoundField DataField="Complaint" HeaderText="Complaint"
SortExpression="Complaint" />
<asp:BoundField DataField="Importance" HeaderText="Importance"
SortExpression="Importance" />
<asp:BoundField DataField="EntBy" HeaderText="Ent By" SortExpression="EntBy" />
<asp:BoundField DataField="Status" HeaderText="Status"
SortExpression="Status" />
<asp:BoundField DataField="DateComplete" HeaderText="Date Complete"
SortExpression="DateComplete" />
<asp:BoundField DataField="OkCheryl" HeaderText="Ok Cheryl"
SortExpression="OkCheryl" />
<asp:BoundField DataField="OkDale" HeaderText="Ok Dale"
SortExpression="OkDale" />
<asp:CommandField ShowSelectButton="True" />
</Columns>
<PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
</asp:GridView>
<br />
</td>
<td>
<br />
<br />
</td>
</tr>
</table>
<table class="style1">
<tr>
<td class="style4">
</td>
<td class="style5">
<h1 style="width: 831px">
Details</h1>
</td>
<td>
</td>
</tr>
</table>
<table class="style1">
<tr>
<td class="style3">
<br />
</td>
<td style="text-align: left" class="style6">
<asp:FormView ID="ToDoDetailForm" runat="server"
BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px"
CellPadding="2" DataKeyNames="Id" DataSourceID="dlpastelconnect"
ForeColor="Black" Width="970px" Height="241px">
<FooterStyle BackColor="Tan" />
<EditItemTemplate>
Date In: <asp:TextBox ID="DateInTextBox" runat="server" Text='<%# Bind("DateIn") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
BackColor="Yellow" ControlToValidate="DateInTextBox"
ErrorMessage="Date In May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
EntBy:
<asp:TextBox ID="EntByTextBox" runat="server" Text='<%# Bind("EntBy") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BackColor="Yellow" ControlToValidate="EntByTextBox"
ErrorMessage="Ent By Must Not Be Blank" Font-Bold="True">!</asp:RequiredFieldValidator>
Importance:
<asp:TextBox ID="ImportanceTextBox" runat="server"
Text='<%# Bind("Importance") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server"
BackColor="Yellow" ControlToValidate="ImportanceTextBox"
ErrorMessage="Importance Can Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Status:
<asp:TextBox ID="StatusTextBox" runat="server" Text='<%# Bind("Status") %>'
Height="24px" Width="130px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server"
BackColor="Yellow" ErrorMessage="Status May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Complaint:
<asp:TextBox ID="ComplaintTextBox" runat="server" Height="22px"
Text='<%# Bind("Complaint") %>' Width="770px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BackColor="Yellow" ControlToValidate="ComplaintTextBox"
ErrorMessage="Complaint May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Details :
<asp:TextBox ID="ComplaintDetailsTextBox" runat="server" Height="69px"
Text='<%# Bind("ComplaintDetails") %>' Width="771px"
style="text-align: left" TextMode="MultiLine" />
<br />
<br />
Notes:
<asp:TextBox ID="NotesTextBox" runat="server" Height="87px"
Text='<%# Bind("Notes") %>' TextMode="MultiLine"
Width="774px" />
<br />
Date<br />
Complete:
<asp:TextBox ID="DateCompleteTextBox" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<br />
Solution:
<asp:TextBox ID="SolutionTextBox" runat="server" Height="86px"
Text='<%# Bind("Solution") %>' Width="771px" TextMode="MultiLine" />
<br />
<br />
Ok Dan:
<asp:TextBox ID="OkDanTextBox" runat="server" Text='<%# Bind("OkDan") %>' />
Ok Cheryl:
<asp:TextBox ID="OkCherylTextBox" runat="server"
Text='<%# Bind("OkCheryl") %>' />
Ok Dale:
<asp:TextBox ID="OkDaleTextBox" runat="server" Text='<%# Bind("OkDale") %>' />
OkWes:
<asp:TextBox ID="OkWesTextBox" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<br />
Version:
<asp:TextBox ID="VersionTextBox" runat="server" Text='<%# Bind("Version") %>' />
VersionDate:
<asp:TextBox ID="VersionDateTextBox" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<br />
Prompt Changes: <br />
<asp:TextBox
ID="PromptChangesTextBox" runat="server"
Height="62px" Text='<%# Bind("PromptChanges") %>' Width="792px"
TextMode="MultiLine" />
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
BackColor="White" Width="858px" />
<br />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Save" BackColor="White" BorderStyle="Groove" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel"
BackColor="White" BorderStyle="Groove" />
<br />
<br />
</EditItemTemplate>
<InsertItemTemplate>
DateIn:
<asp:TextBox ID="DateInTextBox0" runat="server" Text='<%# Bind("DateIn") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="DateInTextBox0" ErrorMessage="Date In May Not Be Empty"
BackColor="Yellow" Font-Bold="True">!</asp:RequiredFieldValidator>
EntBy:
<asp:TextBox ID="EntByTextBox0" runat="server" Text='<%# Bind("EntBy") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
BackColor="Yellow" ControlToValidate="EntByTextBox0"
ErrorMessage="Ent By May Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Importance:
<asp:TextBox ID="ImportanceTextBox0" runat="server"
Text='<%# Bind("Importance") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server"
BackColor="Yellow" ControlToValidate="ImportanceTextBox0"
ErrorMessage="Importance Must Not Be Empty" Font-Bold="True">!</asp:RequiredFieldValidator>
Status:
<asp:TextBox ID="StatusTextBox0" runat="server" Text='<%# Bind("Status") %>'
/>
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server"
ErrorMessage="Status May Not Be Empty" BackColor="Yellow"
ControlToValidate="StatusTextBox0" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Complaint:
<asp:TextBox ID="ComplaintTextBox0" runat="server" Height="18px"
Text='<%# Bind("Complaint") %>' Width="725px" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="ComplaintTextBox0"
ErrorMessage="Complaint May Not Be Empty" BackColor="Yellow" Font-Bold="True">!</asp:RequiredFieldValidator>
<br />
<br />
Details:
<asp:TextBox ID="ComplaintDetailsTextBox0" runat="server" Height="48px"
Text='<%# Bind("ComplaintDetails") %>' Width="727px"
TextMode="MultiLine" />
<br />
<br />
Notes:
<asp:TextBox ID="NotesTextBox0" runat="server" Height="52px"
style="margin-left: 0px"
Text='<%# Bind("Notes") %>' TextMode="MultiLine"
Width="724px" />
<br />
Date
<br />
Complete:
<asp:TextBox ID="DateCompleteTextBox0" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<br />
Solution:
<asp:TextBox ID="SolutionTextBox0" runat="server" Height="56px"
Text='<%# Bind("Solution") %>' Width="736px" TextMode="MultiLine" />
<br />
<br />
Ok Dan:
<asp:TextBox ID="OkDanTextBox0" runat="server" Text='<%# Bind("OkDan") %>' />
Ok Cheryl:
<asp:TextBox ID="OkCherylTextBox0" runat="server"
Text='<%# Bind("OkCheryl") %>' />
Ok Dale:
<asp:TextBox ID="OkDaleTextBox0" runat="server" Text='<%# Bind("OkDale") %>' />
OkWes:
<asp:TextBox ID="OkWesTextBox0" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<br />
Version:
<asp:TextBox ID="VersionTextBox0" runat="server"
Text='<%# Bind("Version") %>' />
Version Date:
<asp:TextBox ID="VersionDateTextBox0" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<br />
Prompt
<br />
Changes:
<asp:TextBox ID="PromptChangesTextBox0" runat="server" Height="43px"
Text='<%# Bind("PromptChanges") %>' Width="701px" TextMode="MultiLine" />
<br />
<br />
<asp:ValidationSummary ID="ValidationSummary2" runat="server" BackColor="White"
Height="35px" Width="809px" />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Save" BackColor="White" BorderStyle="Outset" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" BackColor="White"
BorderStyle="Outset" />
</InsertItemTemplate>
<ItemTemplate>
<b>Date In:</b>
<asp:Label ID="DateInLabel" runat="server" Text='<%# Bind("DateIn") %>' />
<b>Ent By</b>:
<asp:Label ID="EntByLabel" runat="server" Text='<%# Bind("EntBy") %>' />
<b>Importance:</b>
<asp:Label ID="ImportanceLabel" runat="server"
Text='<%# Bind("Importance") %>' />
<b>Status:</b>
<asp:Label ID="StatusLabel" runat="server" Text='<%# Bind("Status") %>' />
<br />
<b>Complaint:</b>
<asp:Label ID="ComplaintLabel" runat="server" Text='<%# Bind("Complaint") %>' />
<br />
<b>Complaint Details:</b>
<asp:Label ID="ComplaintDetailsLabel" runat="server"
Text='<%# Bind("ComplaintDetails") %>' />
<br />
<b>Notes:</b>
<asp:Label ID="NotesLabel" runat="server" Text='<%# Bind("Notes") %>' />
<br />
<b>Date Complete:</b>
<asp:Label ID="DateCompleteLabel" runat="server"
Text='<%# Bind("DateComplete") %>' />
<br />
<b>Solution:</b>
<asp:Label ID="SolutionLabel" runat="server" Text='<%# Bind("Solution") %>' />
<br />
<b>Ok Dan:</b>
<asp:Label ID="OkDanLabel" runat="server" Text='<%# Bind("OkDan") %>' />
<b>Ok Cheryl:</b>
<asp:Label ID="OkCherylLabel" runat="server" Text='<%# Bind("OkCheryl") %>' />
<b>Ok Dale:</b>
<asp:Label ID="OkDaleLabel" runat="server" Text='<%# Bind("OkDale") %>' />
<b>Ok Wes:</b>
<asp:Label ID="OkWesLabel" runat="server" Text='<%# Bind("OkWes") %>' />
<br />
<b>Version:</b>
<asp:Label ID="VersionLabel" runat="server" Text='<%# Bind("Version") %>' />
VersionDate:
<asp:Label ID="VersionDateLabel" runat="server"
Text='<%# Bind("VersionDate") %>' />
<br />
<b>Prompt Changes:</b>
<asp:Label ID="PromptChangesLabel" runat="server"
Text='<%# Bind("PromptChanges") %>' />
<br />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" BorderStyle="Groove" />
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" BackColor="White"
BorderStyle="Groove" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" BackColor="White" BorderStyle="Groove" />
</ItemTemplate>
<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue"
HorizontalAlign="Center" />
<HeaderStyle BackColor="Tan" Font-Bold="True" />
<InsertRowStyle BackColor="#339966" />
<EditRowStyle BackColor="#3366FF" ForeColor="GhostWhite" Width="950px" />
</asp:FormView>
</td>
<td>
</td>
</tr>
</table>
</form>
</body>
</html>
Thanks in advance
Dan