Hi:
Im *very* new to programming and am using VB.NET. I am just doing a test form to practice making changes to a test database but I keep getting an error. I created a small db in SQL 2000 with just a few rows of data. In VB.NET, I make the sqlConnection, the sqlDataAdapter and a DataSet just fine. I created a form with a couple of textboxes tied to a column in the DataSet. The data displays just fine. But when I try to make a change and run my update code I catch an exception saying:

"Value cannot be null. Parameter name: DataSet."

The data does not get modified at all. I have no idea what's wrong since the IDE doesnt give me any errors or warnings upon compilation. Here's my code for the form. The only thing that Ive added is the Form_Load and the Button1_Click events:

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DsRecTest1.Clear() 'LIMPIA EL DATASET ANTERIOR SI ALGUNO

SqlConnection1.Open()

Try
SqlDataAdapter1.Fill(DsRecTest1)
Catch fillException As System.Exception
MessageBox.Show("Caught Exception: " & fillException.Message)
End Try

SqlConnection1.Close()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SqlConnection1.Open()

Dim updatedRows As DataSet
Dim insertedRows As DataSet
Dim deletedRows As DataSet

updatedRows = DsRecTest1.GetChanges(DataRowState.Modified)
insertedRows = DsRecTest1.GetChanges(DataRowState.Added)
deletedRows = DsRecTest1.GetChanges(DataRowState.Deleted)

Try
SqlDataAdapter1.Update(updatedRows)
SqlDataAdapter1.Update(insertedRows)
SqlDataAdapter1.Update(deletedRows)
Catch updateException As System.Exception
MessageBox.Show("Caught Exception: " & updateException.Message)
End Try

SqlConnection1.Close()
End Sub


I know it's probably something simple but I really don't have any books to rely on, just some tutorial I found on the web. Thanks for any help!