473,769 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Value cannot be null

Hi,

I'm new to .NET and I'm trying to run through the tutorial
"Creating a Web Application Using VB"

As I follow the directions, It seems to work just fine.

I can preview the data from the SQLDataAdapter but when I
try to view the data in the browser I get the error:
Value cannot be null. Parameter name: dataSet
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.Argument NullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.Componen tModel.Componen t
Line 3: Public Sub FillDataSet(ByV al dSet As
myDataSet)
Line 4: SqlDataAdapter1 .Fill(dSet)
Line 5: End Sub
Line 6: #Region " Component Designer generated code "

Any help would be appreciated. thx.

Paul
801.366.0224
pt***@yahoo.com
Nov 20 '05 #1
3 6439
> Exception Details: System.Argument NullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.Componen tModel.Componen t
Line 3: Public Sub FillDataSet(ByV al dSet As
myDataSet)
Line 4: SqlDataAdapter1 .Fill(dSet)
Line 5: End Sub
Line 6: #Region " Component Designer generated code "


The error message means that you have not instantiated the dataset object
you are trying to fill

Dim dSet as new Dataset.

Public Sub FillDataSet(ByV al dSet)
SqlDataAdapter1 .Fill(dSet)
End Sub
Nov 20 '05 #2
Thanks for a quick reply; howerver,

doens't line 3 below instantiate the dataset?
-----Original Message-----
Exception Details: System.Argument NullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.Componen tModel.Componen t
Line 3: Public Sub FillDataSet(ByV al dSet As
myDataSet)
Line 4: SqlDataAdapter1 .Fill(dSet)
Line 5: End Sub
Line 6: #Region " Component Designer generated code "
The error message means that you have not instantiated

the dataset objectyou are trying to fill

Dim dSet as new Dataset.

Public Sub FillDataSet(ByV al dSet)
SqlDataAdapter1 .Fill(dSet)
End Sub
.

Nov 20 '05 #3
Nothing in this code Instantiates a dataset. If the calling code passed in
an Instantiated dataset, it would be ok. what does the caller look like?
before you pass in the dataset do you create a new Datasst

Dim myDS as New DataSet?
<an*******@disc ussions.microso ft.com> wrote in message
news:58******** *************** *****@phx.gbl.. .
Thanks for a quick reply; howerver,

doens't line 3 below instantiate the dataset?
-----Original Message-----
Exception Details: System.Argument NullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.Componen tModel.Componen t
Line 3: Public Sub FillDataSet(ByV al dSet As
myDataSet)
Line 4: SqlDataAdapter1 .Fill(dSet)
Line 5: End Sub
Line 6: #Region " Component Designer generated code "


The error message means that you have not instantiated

the dataset object
you are trying to fill

Dim dSet as new Dataset.

Public Sub FillDataSet(ByV al dSet)
SqlDataAdapter1 .Fill(dSet)
End Sub
.

Nov 20 '05 #4

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

Similar topics

2
58117
by: Chris Herring | last post by:
Hi there: Well, let me start off by saying that I am a Visual Studio drag and drop weenie, not a real programmer. So I tend to get confused when things do not look like the instructions said they were going to look :) . Here is my current dilemma: I am having a strange problem with my ASP.NET application. I am building the application using Visual Basic .Net in Visual Studio.NET 2003. Lately, I have frequently been getting the following...
1
2301
by: Jim | last post by:
I am experiancing a problem filling a dataset. I am getting a Value cannot be null exception and can't figure out why. Here is the code what the heck could be going on? Dim conn As New SqlConnection(ConnectionString) Dim adapter As New SqlDataAdapter strSQL = "SELECT * FROM ChiefComplaints" adapter.SelectCommand = New SqlCommand(strSQL, conn) adapter.Fill(dataSet)
0
1304
by: Marc Meermans | last post by:
While converting a schema library into a .Net class library using XSD I constantly kept running into the following error message issues by the tool: Error: Error generating classes for schema 'XYZ'. - Schema with targetNamespace='' has invalid syntax. - Invalid 'memberTypes' attribute: Value cannot be null. Parameter name: name. The schema library being so extensively large, it took me 4 days to discover that the error was caused by...
1
5728
by: David C. allen | last post by:
I have created a simple Client-side SOAP Extension for a webclass that I have. When I apply the extension attribute to the the calling function in the proxy class I get an error 'Value cannot be null'. When the extension attribute is not applied it runs fine. The wierd thing is that it does not appear to be an error within the SOAP extension because I break-pointed it and when the proxy function gets called the SOAP extension runs fine....
1
16956
by: Sanjay Godbole | last post by:
Hi, I am getting following error while executing the axpx page. 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.ArgumentNullException: Value
1
24145
by: EagleRed | last post by:
I have an ASP.NET application that is using forms authentication. The authentication component redirects to the main application page and includes a querystring parameter that the application processes further based on the users identity. The problem is that we consistently get an exception with error message, "Value cannot be null. Parameter name: uriString". We have not been able to determine the source of this error. We are running...
4
4255
by: Phil Kelly | last post by:
Hi! Is it possible to set the value of an Active Directory attribute to be empty? I've tried to set the 'company' attribute as follows: myRepEntry.Properties(strAttrName)(0) = Nothing but I get an error stating that the value cannot be NULL.
2
14749
by: paul.dunstone | last post by:
HI all I am using msbuild to compile my web application project. After building the solution I get the following error message: Server Error in '/Community' Application. -------------------------------------------------------------------------------- Value cannot be null.
0
9851
by: pankajprakash | last post by:
Hi all I am using the Ajax control toolkit and want to the fill the gridview but at the time of rendering it occurs the error "Sys.ArgumentNullException: Value cannot be null. Parameter name: element". Here am posting the whole .ascx page. Will you please let me know how can i remove this error.
0
9589
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
9423
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
10049
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
9997
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
9865
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
8873
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6675
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
5309
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3965
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.