Groups | Blog | Home
all groups > vb.net data > april 2004 >

vb.net data : Value cannot be null



Paul
4/28/2004 10:17:29 AM
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
because 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
ptoyn@yahoo.com
Josh.Moody NO[at]SPAM online.microsoft.com
4/29/2004 10:38:35 PM
i'm guessing your data set hasn't been newed. Wherever you declare it, make
it new:

dim dSet as New myDataSet

Josh Moody
Developer Division Sustained Engineering Team

--

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
[quoted text, click to view]
AddThis Social Bookmark Button