473,394 Members | 2,052 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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.ArgumentNullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.ComponentModel.Component
Line 3: Public Sub FillDataSet(ByVal 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 6414
> Exception Details: System.ArgumentNullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.ComponentModel.Component
Line 3: Public Sub FillDataSet(ByVal 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(ByVal 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.ArgumentNullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.ComponentModel.Component
Line 3: Public Sub FillDataSet(ByVal 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(ByVal 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*******@discussions.microsoft.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.ArgumentNullException: Value
cannot be null. Parameter name: dataSet

Source Error:

Line 2: Inherits System.ComponentModel.Component
Line 3: Public Sub FillDataSet(ByVal 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(ByVal 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
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...
1
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...
0
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...
1
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...
1
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...
1
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...
4
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...
2
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....
0
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:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...

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.