469,945 Members | 1,348 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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

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.ExecuteCommandTextF orSingleResult(tagDBPARAMS
dbParams, Object& executeResult) +177
System.Data.OleDb.OleDbCommand.ExecuteCommandText( Object&
executeResult) +194
System.Data.OleDb.OleDbCommand.ExecuteCommand(Comm andBehavior
behavior, Object& executeResult) +56
System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior
behavior, String method) +105
System.Data.OleDb.OleDbCommand.ExecuteNonQuery() +88

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

System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(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.OnBubbleEven t(Object source,
EventArgs e) +87
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.DetailsViewRow.OnBubbleE vent(Object
source, EventArgs e) +109
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs
args) +35
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e)
+86
System.Web.UI.WebControls.LinkButton.RaisePostBack Event(String
eventArgument) +153

System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData)
+172
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+4919

Sep 19 '06 #1
0 1449

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Andy Cunningham | last post: by
reply views Thread by Victor Engmark | last post: by
3 posts views Thread by Phil Sherman | last post: by
6 posts views Thread by Josť Joye | last post: by
1 post views Thread by Giorgio | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.