I'm totally brand studying out of a book that seems to be a little misleading sometimes. Anyway, the program just has a datagridview control and 2 command buttons on it with a sqlconnection, sqldataadaptor and dataset connection, connecting to the northwind access database that I imported into sql server. Here's the code. I'm sure I'm missing somethings but please remember I'm new :)
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
SqlDataAdapter1.Fill(DataSet11, "Customers")
With DataGridView1
.DataSource = DataSet11
End With
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
DataGridView1.Update()
SqlDataAdapter1.Update(DataSet11)
End Sub
End Class
|