471,349 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Help Value cannot be null exception

Jim
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)

this is right out of the help section. I've tested the connection string and
it opens a connection with no problems.
--
Thanks, Jim
Aug 11 '05 #1
1 2033
My ugess is that the 'dataSet' variable is null.

"Jim" <Ji*@discussions.microsoft.com> wrote in message
news:8A**********************************@microsof t.com...
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)

this is right out of the help section. I've tested the connection string
and
it opens a connection with no problems.
--
Thanks, Jim

Aug 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by jhon02148 | last post: by
6 posts views Thread by David N | last post: by
1 post views Thread by Sanjay Godbole | last post: by
2 posts views Thread by hcaptech | last post: by
2 posts views Thread by yeshello54 | last post: by
reply views Thread by XIAOLAOHU | last post: by

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.