Can't get a simple dataset working

O

OrlandoRocks

I know I will feel stupid when someone points it out but what is wrong
with this:

Dim Connection1 As SqlClient.SqlConnection = New
SqlClient.SqlConnection("Database=MyStore;uid=sa;pwd=password")

Connection1.Open()
Dim StringSelect = "select * from amazon"
Dim cmd2 As SqlClient.SqlCommand = _
New SqlClient.SqlCommand("SELECT * FROM amazon", Connection1)


Dim DA1 As SqlClient.SqlDataAdapter
Dim DS1 As DataSet
DA1.SelectCommand = cmd2

The last line throws me a "Object reference not set to an instance of
an object"

Please tell me what I am missing?

Thanks
Russ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top