473,657 Members | 2,521 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

Sep 19 '06 #1
0 1631

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1716
by: Andy Cunningham | last post by:
Hi all, Has anyone seen a problem like this before: http://80.177.2.28/phpinfo.php This is a webserver on my home PC, and when viewed from there it looks fine. However, from computers across the internet, the page 'explodes' halfway down, but in different places each time (if it loads OK try hitting refresh). I'm fairly sure the PHP code is not the problem, as this same problem occurs with the phpinfo page, with a
0
1303
by: Victor Engmark | last post by:
I am quite new to XForms, but I need to do a feasibility study to see whether a system I'm supposed to make can be done without any scripting or programming language (to make it simple and not need any installation except for an Xforms reader). The problem is, from what I've read, I cannot find clear answers to whether XForms can do everything it will need to... The challenges are as follows: - One input.xml file is generated by...
3
2861
by: Phil Sherman | last post by:
What is the relationship between the snapshot elements: Log pages written Number write log IOs Number partial page log IOs There doesn't appear to be any information in my PDF System monitor guide or the online information center. When a COMMIT is issued; a log page containing updates must be written to disk before control is returned to the application program. This
0
1267
by: Junkguy | last post by:
I need to be able to tell if the blank row of a DataGrid has been edited or not. In a DataGrid, you may notice that if you click on the asterisk row, the asterisk will change to a triangle, but no "new" blank asterisked row will be added to the bottom *until* you type some data. How can I tell if you have begun to type data into this row or not? Here is the reason I need this. I need to call CurrencyManager.EndCurrentEdit() on a row...
6
4595
by: José Joye | last post by:
Hello, I'm currently reading the MS Developing Web applications with c# (and VB.net). In the chapter related to Error management, there is a sample about "Page-Level Error Pages" eg: In my form: ========
1
2234
by: emon.haider | last post by:
Hi guys, I just made a web application using ASP.Net and C#. The application compiles and works fine from my workstation, but after I uploaded it to my webserver, I am getting an error of "the page cannot be displayed" in IE and "the document contains no data" in FireFox. The error I get is when I try to access page, which is www.mywebsite.com/addtocart.aspx?ProductID=xx. I know for a fact that addtocart.aspx exists but I am still...
1
1018
by: bill | last post by:
Yes, it's an old book (Introducing MS Visual Basic 2005 for Developers, Sean Campbell, et al) but I like it. For their Walkthrough source code, they point to : http://msdn.microsoft.com/vbasic/VB6Migration but this link is no longer valid. Anyone know the properURL? TIA,
2
4841
by: Ed Staffin | last post by:
In Internet Explorer under the tools/internet options menu on the general tab, there is a settings button under Temporary internet files. In there the user can specify when to "Check for newer versions of stored pages." I want to make sure that my pages are refreshed every time they visit regardless of this setting. Is there a way to do this? Thanks ... Ed
1
3141
by: Giorgio | last post by:
Hi, I have a dropdown menu with categories and when a category is selected the Gridview is binded with sub-categories. Then when a sub-category is selected a detailsview is displayed side-by-side to the gridview and then I can click on "new" and isert a new subcategory or edit and update the sub-category. My problem is that when a category doesn't have any sub-categories then the Gridview is not displayed therefore there's no way I can...
0
8392
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8726
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.