Problems with Walkthrough: Editing and Inserting Data in Web Pages with the DetailsView Web Server C

T

tom c

I am going through "Walkthrough: Editing and Inserting Data in Web
Pages with the DetailsView Web Server Control" found at

http://msdn2.microsoft.com/en-us/library/sdba1d59.aspx

I am using Access instead of SQL Server. Everything works fine until I
get to the last step, where I try to insert a record. When I hit the
New link it lets me add the new data, but then when I hit Insert, I get
the yellow page which I have paseted below. I have been through this 3
times and am stuck.


Server Error in '/Test003' Application.
You tried to assign the Null value to a variable that is not a Variant
data type.
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) +177
System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object&
executeResult) +194
System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior
behavior, Object& executeResult) +56
System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior
behavior, String method) +105
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +88

System.Web.UI.WebControls.SqlDataSourceView.ExecuteDbCommand(DbCommand
command, DataSourceOperation operation) +392

System.Web.UI.WebControls.SqlDataSourceView.ExecuteInsert(IDictionary
values) +403
System.Web.UI.DataSourceView.Insert(IDictionary values,
DataSourceViewOperationCallback callback) +68
System.Web.UI.WebControls.DetailsView.HandleInsert(String
commandArg, Boolean causesValidation) +390
System.Web.UI.WebControls.DetailsView.HandleEvent(EventArgs e,
Boolean causesValidation, String validationGroup) +609
System.Web.UI.WebControls.DetailsView.OnBubbleEvent(Object source,
EventArgs e) +87
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.DetailsViewRow.OnBubbleEvent(Object
source, EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(CommandEventArgs e)
+86
System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String
eventArgument) +153

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)
+4919
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top