When I try to insert a record into a table (access) to control DetailsView I always appears the foll

Discussion in 'ASP .Net' started by deneushasler, Jul 2, 2008.

  1. deneushasler

    deneushasler Guest

    Hello my name is Juan Jose.
    My problem is as follows. When I try to insert a record into a
    table (access) to control DetailsView Visual Web Developer 2005,
    when I run the page and insert a record pulse, whenever I get the
    following error:

    How could fix it?


    [OleDbException (0x80004005): Ha intentado asignar el valor Null a una
    variable que no es un tipo de datos Variant.]
    System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
    hr) +65
    System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
    dbParams, Object& executeResult) +181
    System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
    +307
    System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
    Object& executeResult) +77
    System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
    behavior, String method) +188
    System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
    command, DataSourceOperation operation) +495
    System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
    values) +557
    System.Web.UI.DataSourceView.Insert(IDictionary values,
    DataSourceViewOperationCallback callback) +173
    System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
    Boolean causesValidation) +627
    System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
    causesValidation, String validationGroup) +745
    System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source, EventArgs
    e) +163
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
    System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
    EventArgs e) +118
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
    System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
    System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
    eventArgument) +178
    System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    eventArgument) +31
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    sourceControl, String eventArgument) +32
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
    System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
    deneushasler, Jul 2, 2008
    #1
    1. Advertising

  2. deneushasler

    David Wier Guest

    Just glancing, knowing very little spanish - could it be that you have what
    you think is an autonumber field, but it's not set for autonumber, and
    you're not supplying it with data, in your insert statement?

    One way or the other, it looks like you've got no data for a field that does
    not allow nulls


    David Wier
    http://aspnet101.com
    http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
    bloated markup


    "deneushasler" <> wrote in message
    news:...
    > Hello my name is Juan Jose.
    > My problem is as follows. When I try to insert a record into a
    > table (access) to control DetailsView Visual Web Developer 2005,
    > when I run the page and insert a record pulse, whenever I get the
    > following error:
    >
    > How could fix it?
    >
    >
    > [OleDbException (0x80004005): Ha intentado asignar el valor Null a una
    > variable que no es un tipo de datos Variant.]
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
    > hr) +65
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
    > dbParams, Object& executeResult) +181
    > System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
    > +307
    > System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
    > Object& executeResult) +77
    > System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
    > behavior, String method) +188
    > System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
    > command, DataSourceOperation operation) +495
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
    > values) +557
    > System.Web.UI.DataSourceView.Insert(IDictionary values,
    > DataSourceViewOperationCallback callback) +173
    > System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
    > Boolean causesValidation) +627
    > System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
    > causesValidation, String validationGroup) +745
    > System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source,
    > EventArgs
    > e) +163
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
    > EventArgs e) +118
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
    > System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
    > eventArgument) +178
    >
    > System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +31
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +32
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
    > System.Web.UI.Page.ProcessRequestMain(Boolean
    > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
    >
    >
    David Wier, Jul 2, 2008
    #2
    1. Advertising

  3. deneushasler

    deneushasler Guest

    If there is an autonumber field as can be solved?





    "deneushasler" <> escribió en el mensaje de
    noticias:...
    > Hello my name is Juan Jose.
    > My problem is as follows. When I try to insert a record into a
    > table (access) to control DetailsView Visual Web Developer 2005,
    > when I run the page and insert a record pulse, whenever I get the
    > following error:
    >
    > How could fix it?
    >
    >
    > [OleDbException (0x80004005): Ha intentado asignar el valor Null a una
    > variable que no es un tipo de datos Variant.]
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
    > hr) +65
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
    > dbParams, Object& executeResult) +181
    > System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
    > +307
    > System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
    > Object& executeResult) +77
    > System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
    > behavior, String method) +188
    > System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
    > command, DataSourceOperation operation) +495
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
    > values) +557
    > System.Web.UI.DataSourceView.Insert(IDictionary values,
    > DataSourceViewOperationCallback callback) +173
    > System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
    > Boolean causesValidation) +627
    > System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
    > causesValidation, String validationGroup) +745
    > System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source,
    > EventArgs
    > e) +163
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
    > EventArgs e) +118
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
    > System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
    > eventArgument) +178
    >
    > System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +31
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +32
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
    > System.Web.UI.Page.ProcessRequestMain(Boolean
    > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
    >
    >
    deneushasler, Jul 3, 2008
    #3
  4. deneushasler

    deneushasler Guest

    Hello, you could send me a project to insert records in fields with
    autonumber, my mail is
    Thank you





    "deneushasler" <> escribió en el mensaje de
    noticias:...
    > Hello my name is Juan Jose.
    > My problem is as follows. When I try to insert a record into a
    > table (access) to control DetailsView Visual Web Developer 2005,
    > when I run the page and insert a record pulse, whenever I get the
    > following error:
    >
    > How could fix it?
    >
    >
    > [OleDbException (0x80004005): Ha intentado asignar el valor Null a una
    > variable que no es un tipo de datos Variant.]
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult
    > hr) +65
    >
    > System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS
    > dbParams, Object& executeResult) +181
    > System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
    > +307
    > System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior,
    > Object& executeResult) +77
    > System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
    > behavior, String method) +188
    > System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
    > command, DataSourceOperation operation) +495
    > System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
    > values) +557
    > System.Web.UI.DataSourceView.Insert(IDictionary values,
    > DataSourceViewOperationCallback callback) +173
    > System.Web.UI.WebControls.FormView.HandleInsert(String commandArg,
    > Boolean causesValidation) +627
    > System.Web.UI.WebControls.FormView.HandleEvent(EventArgs e, Boolean
    > causesValidation, String validationGroup) +745
    > System.Web.UI.WebControls.FormView.OnBubbleEvent(Object source,
    > EventArgs
    > e) +163
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.FormViewRow.OnBubbleEvent(Object source,
    > EventArgs e) +118
    > System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
    > +56
    > System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e) +107
    > System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
    > eventArgument) +178
    >
    > System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
    > eventArgument) +31
    > System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
    > sourceControl, String eventArgument) +32
    > System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +244
    > System.Web.UI.Page.ProcessRequestMain(Boolean
    > includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
    >
    >
    deneushasler, Jul 3, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shin
    Replies:
    2
    Views:
    1,105
    chris
    Oct 23, 2003
  2. mansour via DotNetMonster.com

    when i try to insert or update text in arabic it appears "????"

    mansour via DotNetMonster.com, Sep 11, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    767
    Juan T. Llibre
    Sep 11, 2005
  3. =?Utf-8?B?SmF5RA==?=

    insert new record in detailsview - how to get master id

    =?Utf-8?B?SmF5RA==?=, Jul 3, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    5,727
    Richard Carpenter
    Jul 10, 2006
  4. Frits van Soldt

    How to insert a new record in detailsview when there are no record

    Frits van Soldt, Nov 16, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    718
    Frits van Soldt
    Nov 17, 2005
  5. Feege
    Replies:
    0
    Views:
    429
    Feege
    Dec 20, 2005
Loading...

Share This Page