467,926 Members | 1,414 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,926 developers. It's quick & easy.

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

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.ExecuteCommandTextE rrorHandling(OleDbHResult
hr) +65
System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +181
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+307
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +77
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +188
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
command, DataSourceOperation operation) +495
System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
values) +557
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +173
System.Web.UI.WebControls.FormView.HandleInsert(St ring commandArg,
Boolean causesValidation) +627
System.Web.UI.WebControls.FormView.HandleEvent(Eve ntArgs e, Boolean
causesValidation, String validationGroup) +745
System.Web.UI.WebControls.FormView.OnBubbleEvent(O bject source, EventArgs
e) +163
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.FormViewRow.OnBubbleEven t(Object source,
EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +56
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +107
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +178
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837
Jul 2 '08 #1
  • viewed: 1838
Share:
3 Replies
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" <de**********@hotmail.comwrote in message
news:ub**************@TK2MSFTNGP04.phx.gbl...
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.ExecuteCommandTextE rrorHandling(OleDbHResult
hr) +65

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +181
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+307
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +77
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +188
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
command, DataSourceOperation operation) +495
System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
values) +557
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +173
System.Web.UI.WebControls.FormView.HandleInsert(St ring commandArg,
Boolean causesValidation) +627
System.Web.UI.WebControls.FormView.HandleEvent(Eve ntArgs e, Boolean
causesValidation, String validationGroup) +745
System.Web.UI.WebControls.FormView.OnBubbleEvent(O bject source,
EventArgs
e) +163
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.FormViewRow.OnBubbleEven t(Object source,
EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +107
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +178

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837


Jul 2 '08 #2
If there is an autonumber field as can be solved?

"deneushasler" <de**********@hotmail.comescribió en el mensaje de
noticias:ub**************@TK2MSFTNGP04.phx.gbl...
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.ExecuteCommandTextE rrorHandling(OleDbHResult
hr) +65

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +181
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+307
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +77
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +188
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
command, DataSourceOperation operation) +495
System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
values) +557
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +173
System.Web.UI.WebControls.FormView.HandleInsert(St ring commandArg,
Boolean causesValidation) +627
System.Web.UI.WebControls.FormView.HandleEvent(Eve ntArgs e, Boolean
causesValidation, String validationGroup) +745
System.Web.UI.WebControls.FormView.OnBubbleEvent(O bject source,
EventArgs
e) +163
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.FormViewRow.OnBubbleEven t(Object source,
EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +107
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +178

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837

Jul 3 '08 #3
Hello, you could send me a project to insert records in fields with
autonumber, my mail is de**********@hotmail.com
Thank you

"deneushasler" <de**********@hotmail.comescribió en el mensaje de
noticias:ub**************@TK2MSFTNGP04.phx.gbl...
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.ExecuteCommandTextE rrorHandling(OleDbHResult
hr) +65

System.Data.OleDb.OleDbCommand.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +181
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object& executeResult)
+307
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior behavior,
Object& executeResult) +77
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +188
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +113
System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand
command, DataSourceOperation operation) +495
System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary
values) +557
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +173
System.Web.UI.WebControls.FormView.HandleInsert(St ring commandArg,
Boolean causesValidation) +627
System.Web.UI.WebControls.FormView.HandleEvent(Eve ntArgs e, Boolean
causesValidation, String validationGroup) +745
System.Web.UI.WebControls.FormView.OnBubbleEvent(O bject source,
EventArgs
e) +163
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.FormViewRow.OnBubbleEven t(Object source,
EventArgs e) +118
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
+56
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +107
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +178

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +31
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +32
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +244
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3837

Jul 3 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by stuart.d.jones | last post: by
4 posts views Thread by unwantedspam | last post: by
4 posts views Thread by Mark Olbert | last post: by
5 posts views Thread by =?Utf-8?B?bXBhaW5l?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.