[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Error when I try adding a record to an MS Access DB.

Posted on 2006-11-27
5
Medium Priority
?
203 Views
Last Modified: 2012-05-05
I am trying to add a record to my Access database using a FormView. Editing and deleting records works just fine but, adding records causes the following error: (I am somwhat new to .Net and so what may seem simple is not easy for me to find).

Thank you for your help!!

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: You tried to assign the Null value to a variable that is not a Variant data type.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[OleDbException (0x80004005): You tried to assign the Null value to a variable that is not a Variant data type.]
   System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) +267
   System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) +192
   System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult) +48
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +106
   System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +108
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand command, DataSourceOperation operation) +402
   System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary values) +446
   System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) +68
   System.Web.UI.WebControls.FormView.HandleInsert(String commandArg, Boolean causesValidation) +388
   System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup) +609
   System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs e) +95
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source, EventArgs e) +109
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +163
   System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +172
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5614

 
0
Comment
Question by:jhufnagle
  • 3
  • 2
5 Comments
 
LVL 15

Expert Comment

by:crisco96
ID: 18022229
You are trying to assign a null value to a field that cannot contain nulls.  Post your code you use when adding a field and I will give you more specific help.
0
 

Author Comment

by:jhufnagle
ID: 18027716
Here is my code:

<%@ Page Language="C#" MasterPageFile="~/Masters/AdminMaster.master" AutoEventWireup="true" CodeFile="ctcacessadd.aspx.cs" Inherits="Members_ctcacess" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <span style="color: #000099; font-family: Arial"><strong>Contact List<br />
        <br />
        <span style="font-size: 10pt">Add Records Page<br />
        </span>
        <br />
    </strong><span style="font-size: 8pt">(Sorted by Program)<br />
        <br />
    </span></span>
    <asp:FormView ID="FormView1" runat="server" BackColor="#CCCCCC" BorderColor="#999999"
        BorderStyle="Solid" BorderWidth="3px" CellPadding="4" CellSpacing="2" DataKeyNames="ID"
        DataSourceID="AccessDataSourceAddRecs" ForeColor="Black" GridLines="Both" Style="text-align: left"
        Width="470px">
        <FooterStyle BackColor="#CCCCCC" />
        <EditRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
        <EditItemTemplate>
            ID:
            <asp:Label ID="IDLabel1" runat="server" Text='<%# Eval("ID") %>'></asp:Label><br />
            fname1:
            <asp:TextBox ID="fname1TextBox" runat="server" Text='<%# Bind("fname1") %>'>
            </asp:TextBox><br />
            lname1:
            <asp:TextBox ID="lname1TextBox" runat="server" Text='<%# Bind("lname1") %>'>
            </asp:TextBox><br />
            title1:
            <asp:TextBox ID="title1TextBox" runat="server" Text='<%# Bind("title1") %>'>
            </asp:TextBox><br />
            phone1:
            <asp:TextBox ID="phone1TextBox" runat="server" Text='<%# Bind("phone1") %>'>
            </asp:TextBox><br />
            cellph1:
            <asp:TextBox ID="cellph1TextBox" runat="server" Text='<%# Bind("cellph1") %>'>
            </asp:TextBox><br />
            email1:
            <asp:TextBox ID="email1TextBox" runat="server" Text='<%# Bind("email1") %>'>
            </asp:TextBox><br />
            busarea1:
            <asp:TextBox ID="busarea1TextBox" runat="server" Text='<%# Bind("busarea1") %>'>
            </asp:TextBox><br />
            program1:
            <asp:TextBox ID="program1TextBox" runat="server" Text='<%# Bind("program1") %>'>
            </asp:TextBox><br />
            program1lnk:
            <asp:TextBox ID="program1lnkTextBox" runat="server" Text='<%# Bind("program1lnk") %>'>
            </asp:TextBox><br />
            fname2:
            <asp:TextBox ID="fname2TextBox" runat="server" Text='<%# Bind("fname2") %>'>
            </asp:TextBox><br />
            lname2:
            <asp:TextBox ID="lname2TextBox" runat="server" Text='<%# Bind("lname2") %>'>
            </asp:TextBox><br />
            title2:
            <asp:TextBox ID="title2TextBox" runat="server" Text='<%# Bind("title2") %>'>
            </asp:TextBox><br />
            phone2:
            <asp:TextBox ID="phone2TextBox" runat="server" Text='<%# Bind("phone2") %>'>
            </asp:TextBox><br />
            cellph2:
            <asp:TextBox ID="cellph2TextBox" runat="server" Text='<%# Bind("cellph2") %>'>
            </asp:TextBox><br />
            email2:
            <asp:TextBox ID="email2TextBox" runat="server" Text='<%# Bind("email2") %>'>
            </asp:TextBox><br />
            busarea2:
            <asp:TextBox ID="busarea2TextBox" runat="server" Text='<%# Bind("busarea2") %>'>
            </asp:TextBox><br />
            program2:
            <asp:TextBox ID="program2TextBox" runat="server" Text='<%# Bind("program2") %>'>
            </asp:TextBox><br />
            program2lnk:
            <asp:TextBox ID="program2lnkTextBox" runat="server" Text='<%# Bind("program2lnk") %>'>
            </asp:TextBox><br />
            <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update"
                Text="Update">
            </asp:LinkButton>
            <asp:LinkButton ID="UpdateCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel">
            </asp:LinkButton>
        </EditItemTemplate>
        <RowStyle BackColor="White" />
        <PagerStyle BackColor="#CCCCCC" ForeColor="Black" HorizontalAlign="Left" />
        <InsertItemTemplate>
            <span style="font-size: 10pt; color: yellow; font-family: Arial">First Name: </span>
            <asp:TextBox ID="fname1TextBox" runat="server" Text='<%# Bind("fname1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Last Name: </span>
            <asp:TextBox ID="lname1TextBox" runat="server" Text='<%# Bind("lname1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Title: </span>
            <asp:TextBox ID="title1TextBox" runat="server" Text='<%# Bind("title1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Phone: </span>
            <asp:TextBox ID="phone1TextBox" runat="server" Text='<%# Bind("phone1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Cell Phone: </span>
            <asp:TextBox ID="cellph1TextBox" runat="server" Text='<%# Bind("cellph1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Email: </span>
            <asp:TextBox ID="email1TextBox" runat="server" Text='<%# Bind("email1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Business Area: </span>
            <asp:TextBox ID="busarea1TextBox" runat="server" Text='<%# Bind("busarea1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Prog/Proj/Team: </span>
            <asp:TextBox ID="program1TextBox" runat="server" Text='<%# Bind("program1") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: yellow; font-family: Arial">Program Link:</span>
            <asp:TextBox ID="program1lnkTextBox" runat="server" Text='<%# Bind("program1lnk") %>'></asp:TextBox><br />
            <br />
            <span style="color: brown; font-family: Arial"><strong>Alternate (Backup)<br />
            </strong></span>
            <br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">First Name: </span>
            <asp:TextBox ID="fname2TextBox" runat="server" Text='<%# Bind("fname2") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">Last Name: </span>
            <asp:TextBox ID="lname2TextBox" runat="server" Text='<%# Bind("lname2") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">Title: </span>
            <asp:TextBox ID="title2TextBox" runat="server" Text='<%# Bind("title2") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">Phone: </span>
            <asp:TextBox ID="phone2TextBox" runat="server" Text='<%# Bind("phone2") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">Cell Phone: </span>
            <asp:TextBox ID="cellph2TextBox" runat="server" Text='<%# Bind("cellph2") %>'></asp:TextBox><br />
            <span style="font-size: 10pt; color: antiquewhite; font-family: Arial">Email:</span>
            <asp:TextBox ID="email2TextBox" runat="server" Text='<%# Bind("email2") %>'></asp:TextBox><br />
            &nbsp;<br />
            <br />
            <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert"
                Text="Insert"></asp:LinkButton>
            <asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False" CommandName="Cancel"
                Text="Cancel"></asp:LinkButton>
        </InsertItemTemplate>
        <ItemTemplate>
            ID:
            <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>'></asp:Label><br />
            fname1:
            <asp:Label ID="fname1Label" runat="server" Text='<%# Bind("fname1") %>'></asp:Label><br />
            lname1:
            <asp:Label ID="lname1Label" runat="server" Text='<%# Bind("lname1") %>'></asp:Label><br />
            title1:
            <asp:Label ID="title1Label" runat="server" Text='<%# Bind("title1") %>'></asp:Label><br />
            phone1:
            <asp:Label ID="phone1Label" runat="server" Text='<%# Bind("phone1") %>'></asp:Label><br />
            cellph1:
            <asp:Label ID="cellph1Label" runat="server" Text='<%# Bind("cellph1") %>'></asp:Label><br />
            email1:
            <asp:Label ID="email1Label" runat="server" Text='<%# Bind("email1") %>'></asp:Label><br />
            busarea1:
            <asp:Label ID="busarea1Label" runat="server" Text='<%# Bind("busarea1") %>'></asp:Label><br />
            program1:
            <asp:Label ID="program1Label" runat="server" Text='<%# Bind("program1") %>'></asp:Label><br />
            program1lnk:
            <asp:Label ID="program1lnkLabel" runat="server" Text='<%# Bind("program1lnk") %>'>
            </asp:Label><br />
            fname2:
            <asp:Label ID="fname2Label" runat="server" Text='<%# Bind("fname2") %>'></asp:Label><br />
            lname2:
            <asp:Label ID="lname2Label" runat="server" Text='<%# Bind("lname2") %>'></asp:Label><br />
            title2:
            <asp:Label ID="title2Label" runat="server" Text='<%# Bind("title2") %>'></asp:Label><br />
            phone2:
            <asp:Label ID="phone2Label" runat="server" Text='<%# Bind("phone2") %>'></asp:Label><br />
            cellph2:
            <asp:Label ID="cellph2Label" runat="server" Text='<%# Bind("cellph2") %>'></asp:Label><br />
            email2:
            <asp:Label ID="email2Label" runat="server" Text='<%# Bind("email2") %>'></asp:Label><br />
            busarea2:
            <asp:Label ID="busarea2Label" runat="server" Text='<%# Bind("busarea2") %>'></asp:Label><br />
            program2:
            <asp:Label ID="program2Label" runat="server" Text='<%# Bind("program2") %>'></asp:Label><br />
            program2lnk:
            <asp:Label ID="program2lnkLabel" runat="server" Text='<%# Bind("program2lnk") %>'>
            </asp:Label><br />
            <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" CommandName="Edit"
                Text="Edit">
            </asp:LinkButton>
            <asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False" CommandName="Delete"
                Text="Delete">
            </asp:LinkButton>
            <asp:LinkButton ID="NewButton" runat="server" CausesValidation="False" CommandName="New"
                Text="New">
            </asp:LinkButton>
        </ItemTemplate>
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
    </asp:FormView>
    <asp:AccessDataSource ID="AccessDataSourceAddRecs" runat="server" ConflictDetection="CompareAllValues"
        DataFile="~/App_Data/ctc.mdb" DeleteCommand="DELETE FROM [contacts] WHERE [ID] = ? AND [fname1] = ? AND [lname1] = ? AND [title1] = ? AND [phone1] = ? AND [cellph1] = ? AND [email1] = ? AND [busarea1] = ? AND [program1] = ? AND [program1lnk] = ? AND [fname2] = ? AND [lname2] = ? AND [title2] = ? AND [phone2] = ? AND [cellph2] = ? AND [email2] = ? AND [busarea2] = ? AND [program2] = ? AND [program2lnk] = ?"
        InsertCommand="INSERT INTO [contacts] ([ID], [fname1], [lname1], [title1], [phone1], [cellph1], [email1], [busarea1], [program1], [program1lnk], [fname2], [lname2], [title2], [phone2], [cellph2], [email2], [busarea2], [program2], [program2lnk]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [contacts]"
        UpdateCommand="UPDATE [contacts] SET [fname1] = ?, [lname1] = ?, [title1] = ?, [phone1] = ?, [cellph1] = ?, [email1] = ?, [busarea1] = ?, [program1] = ?, [program1lnk] = ?, [fname2] = ?, [lname2] = ?, [title2] = ?, [phone2] = ?, [cellph2] = ?, [email2] = ?, [busarea2] = ?, [program2] = ?, [program2lnk] = ? WHERE [ID] = ? AND [fname1] = ? AND [lname1] = ? AND [title1] = ? AND [phone1] = ? AND [cellph1] = ? AND [email1] = ? AND [busarea1] = ? AND [program1] = ? AND [program1lnk] = ? AND [fname2] = ? AND [lname2] = ? AND [title2] = ? AND [phone2] = ? AND [cellph2] = ? AND [email2] = ? AND [busarea2] = ? AND [program2] = ? AND [program2lnk] = ?">
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_fname1" Type="String" />
            <asp:Parameter Name="original_lname1" Type="String" />
            <asp:Parameter Name="original_title1" Type="String" />
            <asp:Parameter Name="original_phone1" Type="String" />
            <asp:Parameter Name="original_cellph1" Type="String" />
            <asp:Parameter Name="original_email1" Type="String" />
            <asp:Parameter Name="original_busarea1" Type="String" />
            <asp:Parameter Name="original_program1" Type="String" />
            <asp:Parameter Name="original_program1lnk" Type="String" />
            <asp:Parameter Name="original_fname2" Type="String" />
            <asp:Parameter Name="original_lname2" Type="String" />
            <asp:Parameter Name="original_title2" Type="String" />
            <asp:Parameter Name="original_phone2" Type="String" />
            <asp:Parameter Name="original_cellph2" Type="String" />
            <asp:Parameter Name="original_email2" Type="String" />
            <asp:Parameter Name="original_busarea2" Type="String" />
            <asp:Parameter Name="original_program2" Type="String" />
            <asp:Parameter Name="original_program2lnk" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="fname1" Type="String" />
            <asp:Parameter Name="lname1" Type="String" />
            <asp:Parameter Name="title1" Type="String" />
            <asp:Parameter Name="phone1" Type="String" />
            <asp:Parameter Name="cellph1" Type="String" />
            <asp:Parameter Name="email1" Type="String" />
            <asp:Parameter Name="busarea1" Type="String" />
            <asp:Parameter Name="program1" Type="String" />
            <asp:Parameter Name="program1lnk" Type="String" />
            <asp:Parameter Name="fname2" Type="String" />
            <asp:Parameter Name="lname2" Type="String" />
            <asp:Parameter Name="title2" Type="String" />
            <asp:Parameter Name="phone2" Type="String" />
            <asp:Parameter Name="cellph2" Type="String" />
            <asp:Parameter Name="email2" Type="String" />
            <asp:Parameter Name="busarea2" Type="String" />
            <asp:Parameter Name="program2" Type="String" />
            <asp:Parameter Name="program2lnk" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
            <asp:Parameter Name="original_fname1" Type="String" />
            <asp:Parameter Name="original_lname1" Type="String" />
            <asp:Parameter Name="original_title1" Type="String" />
            <asp:Parameter Name="original_phone1" Type="String" />
            <asp:Parameter Name="original_cellph1" Type="String" />
            <asp:Parameter Name="original_email1" Type="String" />
            <asp:Parameter Name="original_busarea1" Type="String" />
            <asp:Parameter Name="original_program1" Type="String" />
            <asp:Parameter Name="original_program1lnk" Type="String" />
            <asp:Parameter Name="original_fname2" Type="String" />
            <asp:Parameter Name="original_lname2" Type="String" />
            <asp:Parameter Name="original_title2" Type="String" />
            <asp:Parameter Name="original_phone2" Type="String" />
            <asp:Parameter Name="original_cellph2" Type="String" />
            <asp:Parameter Name="original_email2" Type="String" />
            <asp:Parameter Name="original_busarea2" Type="String" />
            <asp:Parameter Name="original_program2" Type="String" />
            <asp:Parameter Name="original_program2lnk" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="fname1" Type="String" />
            <asp:Parameter Name="lname1" Type="String" />
            <asp:Parameter Name="title1" Type="String" />
            <asp:Parameter Name="phone1" Type="String" />
            <asp:Parameter Name="cellph1" Type="String" />
            <asp:Parameter Name="email1" Type="String" />
            <asp:Parameter Name="busarea1" Type="String" />
            <asp:Parameter Name="program1" Type="String" />
            <asp:Parameter Name="program1lnk" Type="String" />
            <asp:Parameter Name="fname2" Type="String" />
            <asp:Parameter Name="lname2" Type="String" />
            <asp:Parameter Name="title2" Type="String" />
            <asp:Parameter Name="phone2" Type="String" />
            <asp:Parameter Name="cellph2" Type="String" />
            <asp:Parameter Name="email2" Type="String" />
            <asp:Parameter Name="busarea2" Type="String" />
            <asp:Parameter Name="program2" Type="String" />
            <asp:Parameter Name="program2lnk" Type="String" />
        </InsertParameters>
    </asp:AccessDataSource>
    <br />
    &nbsp;&nbsp;<br />
    <br />
    <br />
    <asp:AccessDataSource ID="AccessDataSource1"
    runat="server"
    DataFile="~/App_Data/ctc.mdb"
       
        InsertCommand="INSERT INTO [contacts] ([ID], [fname1], [lname1], [title1], [phone1], [cellph1], [email1], [busarea1], [program1], [program1lnk], [fname2], [lname2], [title2], [phone2], [cellph2], [email2], [busarea2], [program2], [program2lnk]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
        SelectCommand="SELECT * FROM [contacts]"
        UpdateCommand="UPDATE [contacts] SET [fname1] = ?, [lname1] = ?, [title1] = ?, [phone1] = ?, [cellph1] = ?, [email1] = ?, [busarea1] = ?, [program1] = ?, [program1lnk] = ?, [fname2] = ?, [lname2] = ?, [title2] = ?, [phone2] = ?, [cellph2] = ?, [email2] = ?, [busarea2] = ?, [program2] = ?, [program2lnk] = ? WHERE [ID] = ?" DeleteCommand="DELETE FROM [contacts] WHERE [ID] = ?" OldValuesParameterFormatString="original_{0}">
       
        <UpdateParameters>
            <asp:Parameter Name="fname1" Type="String" />
            <asp:Parameter Name="lname1" Type="String" />
            <asp:Parameter Name="title1" Type="String" />
            <asp:Parameter Name="phone1" Type="String" />
            <asp:Parameter Name="cellph1" Type="String" />
            <asp:Parameter Name="email1" Type="String" />
            <asp:Parameter Name="busarea1" Type="String" />
            <asp:Parameter Name="program1" Type="String" />
            <asp:Parameter Name="program1lnk" Type="String" />
            <asp:Parameter Name="fname2" Type="String" />
            <asp:Parameter Name="lname2" Type="String" />
            <asp:Parameter Name="title2" Type="String" />
            <asp:Parameter Name="phone2" Type="String" />
            <asp:Parameter Name="cellph2" Type="String" />
            <asp:Parameter Name="email2" Type="String" />
            <asp:Parameter Name="busarea2" Type="String" />
            <asp:Parameter Name="program2" Type="String" />
            <asp:Parameter Name="program2lnk" Type="String" />
            <asp:Parameter Name="original_ID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ID" Type="Int32" />
            <asp:Parameter Name="fname1" Type="String" />
            <asp:Parameter Name="lname1" Type="String" />
            <asp:Parameter Name="title1" Type="String" />
            <asp:Parameter Name="phone1" Type="String" />
            <asp:Parameter Name="cellph1" Type="String" />
            <asp:Parameter Name="email1" Type="String" />
            <asp:Parameter Name="busarea1" Type="String" />
            <asp:Parameter Name="program1" Type="String" />
            <asp:Parameter Name="program1lnk" Type="String" />
            <asp:Parameter Name="fname2" Type="String" />
            <asp:Parameter Name="lname2" Type="String" />
            <asp:Parameter Name="title2" Type="String" />
            <asp:Parameter Name="phone2" Type="String" />
            <asp:Parameter Name="cellph2" Type="String" />
            <asp:Parameter Name="email2" Type="String" />
            <asp:Parameter Name="busarea2" Type="String" />
            <asp:Parameter Name="program2" Type="String" />
            <asp:Parameter Name="program2lnk" Type="String" />
        </InsertParameters>
        <DeleteParameters>
            <asp:Parameter Name="original_ID" Type="Int32" />
        </DeleteParameters>
    </asp:AccessDataSource>
</asp:Content>
0
 
LVL 15

Accepted Solution

by:
crisco96 earned 500 total points
ID: 18027805
I would guess that your ID field is an auto number field, so you should probably change your insert query and insert parameters not to include ID since this will automatically be generated when the row is inserted.

If that isn't the case, please post which columns in the database cannot contain nulls.
0
 

Author Comment

by:jhufnagle
ID: 18029031
Thank you... you are absolutely correct. My ID field is an autonumber field. I thought by removing from the insert item template that this would do the job? I guess I need to remove it from edit, update and insert tmeplates in order to make it work. I'll let you know...
0
 

Author Comment

by:jhufnagle
ID: 18029150
That did it!!

Thank you very much for the help!!

Want to make some money tutoring me? (Is this an appropriate question?)

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question