473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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
3 2066
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: M K | last post by:
Heres my SP: ( i am trying to add more than 1 field but get the same error no matter how many i try to add, i thought i would try to insert the primary key only and work up from there but the...
3
by: stuart.d.jones | last post by:
Hi, I have a DetailsView control bound to a SqlDataSource. I've got everything working nearly as I want, but here's my problem. I have a table which has a Guid as a Primary Key, and a VarChar...
0
by: fig000 | last post by:
Hi, I'm trying to use the sqldatasource control and a detailsview to create a fully functional data entry screen; it's quite easy. I can see the strength of creating a master grid associated...
1
by: JayD | last post by:
Here is the problem: Using asp.net 2.0 to create a web app with standard master table gridview and child detailsview with insert capability. SQL Server 2000 database on the backend. Using Visual...
4
by: unwantedspam | last post by:
Hi All, Thank you in advance. I am trying to insert into two tables but I am getting the following error: "You cannot add or change a record because a related record is required in table..." I am...
4
by: Mark Olbert | last post by:
I am struggling with trying to retrieve the value of an autoincrement identity field after a DetailsView Insert operation. The DetailsView is bound to an SqlDataSource control. So far as I can...
5
by: djsdaddy | last post by:
Good Day All, I have some EEO data in an old dBase4 database that I have converted to an Access table. Since dBase was not a relational database, I didn't create any key fields. I linked all of the...
10
by: MLH | last post by:
Suppose, in a multi-user environment, you have append query SQL in a VBA procedure that looks like INSERT INTO MyTable... and the next line reads MyVar=DMax("","MyTable... You can never be...
5
by: =?Utf-8?B?bXBhaW5l?= | last post by:
Hello, I am completely lost as to why I can't update a DropDownList inside a DetailsView after I perform an insert into an object datasource. I tried to simply it down to the core demostration:...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.