I am trying to update my SQL database. With this code it will not work if I want to pass it the text from a textbox. If I set
Dim outgoingpath As String = TextBox1.Text
it does not work... if I do this instead
Dim outgoingpath As String = "test"
it works. Is there something special I have to do to the textbox to make it work? Thanks.

Dim PathInfo As String
PathInfo = Request.QueryString("OutGoingPath")
Dim strConnection As String
Dim outgoingpath As String = TextBox1.Text
strConnection = "data source=jwallace;initial catalog=Jt;password=testadmin;persist security info=True;user id=Julie;workstation id=Jw;"
Dim mySelectQuery As String = "UPDATE Gateway SET OutGoingPath = '" & outgoingpath & "' WHERE OutGoingPath= '" & PathInfo & "' "
Dim myConnection As New SqlConnection(strConnection)
Dim myCommand As New SqlCommand(mySelectQuery, myConnection)
myConnection.Open()
myCommand.ExecuteNonQuery()
myConnection.Close()