I have written the following statement to insert into a record. The statement works except the value from the text box is not going into the record my variable is.
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Var1 As String = TXTDB1.Text
Dim Var2 As String = TXTDB2.Text
Dim Var3 As String = TXTDB3.Text
Dim Var4 As String = TXTDB5.Text
Dim Var5 As String = TXTDB4.Text
Dim sqlConnection3 As New System.Data.SqlClient.SqlConnection("Data Source=RHINO-ET\BLACKRHINO;Initial Catalog=BlackRhino;Integrated Security=True")
Dim cmd As New System.Data.SqlClient.SqlCommand
cmd.CommandType = System.Data.CommandType.Text
' cmd.CommandText = "INSERT Region (RegionID, RegionDescription) VALUES (5, 'NorthWestern')"
cmd.CommandText = "INSERT INTO Picture(Asset, Description, Location, Asset_Img, IMG_Location) VALUES('Var1', 'Var2', 'Var3', 'Var4', 'Var5')"
cmd.Connection = sqlConnection3
lblMessage.Text = "Record inserted successfully"
Catch ex As Exception
lblMessage.Text = "Unable to insert record"
TXTDB1.Text = " "
TXTDB2.Text = " "
TXTDB3.Text = " "
TXTDB4.Text = " "
TXTDB5.Text = " "