Bonnie,
Thanks for the help. I made the adjustments shown below, but VB is now objecting to my connection at runtime with "The ConnectionString property has not been initialized" though I'm using the name of my connection "Smooth", and it is at least compiling now!
Dim sc As New SqlCommand
Dim Smooth As New SqlConnection
Dim ReturnValue As Integer
sc = New SqlCommand("INSERT INTO Pix (FirstName, LastName) VALUES (@xyz, @abc)", Smooth)
sc.Parameters.AddWithValue("@xyz", TextBox1.Text)
sc.Parameters.AddWithValue("@abc", TextBox2.Text)
Smooth.Open()
ReturnValue = sc.ExecuteNonQuery()
Smooth.Close()
Thanks again,
David.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only