I am going through "Walkthroug h: 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.Ole Db.OleDbExcepti on: 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.Ole Db.OleDbCommand .ExecuteCommand TextForSingleRe sult(tagDBPARAM S
dbParams, Object& executeResult) +177
System.Data.Ole Db.OleDbCommand .ExecuteCommand Text(Object&
executeResult) +194
System.Data.Ole Db.OleDbCommand .ExecuteCommand (CommandBehavio r
behavior, Object& executeResult) +56
System.Data.Ole Db.OleDbCommand .ExecuteReaderI nternal(Command Behavior
behavior, String method) +105
System.Data.Ole Db.OleDbCommand .ExecuteNonQuer y() +88
System.Web.UI.W ebControls.SqlD ataSourceView.E xecuteDbCommand (DbCommand
command, DataSourceOpera tion operation) +392
System.Web.UI.W ebControls.SqlD ataSourceView.E xecuteInsert(ID ictionary
values) +403
System.Web.UI.D ataSourceView.I nsert(IDictiona ry values,
DataSourceViewO perationCallbac k callback) +68
System.Web.UI.W ebControls.Deta ilsView.HandleI nsert(String
commandArg, Boolean causesValidatio n) +390
System.Web.UI.W ebControls.Deta ilsView.HandleE vent(EventArgs e,
Boolean causesValidatio n, String validationGroup ) +609
System.Web.UI.W ebControls.Deta ilsView.OnBubbl eEvent(Object source,
EventArgs e) +87
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs
args) +35
System.Web.UI.W ebControls.Deta ilsViewRow.OnBu bbleEvent(Objec t
source, EventArgs e) +109
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs
args) +35
System.Web.UI.W ebControls.Link Button.OnComman d(CommandEventA rgs e)
+86
System.Web.UI.W ebControls.Link Button.RaisePos tBackEvent(Stri ng
eventArgument) +153
System.Web.UI.W ebControls.Link Button.System.W eb.UI.IPostBack EventHandler.Ra isePostBackEven t(String
eventArgument) +7
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +11
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData)
+172
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint)
+4919