Should this statement work in SQL Server 2000. I run this code on my local server which is running SQL Server 7.0, but if I run it on my web hosting server which is 2000 it doesn't update. I get no error messages, but it doesn't update. Comments.text is a textbox on my page with multiple lines.
Dim strInsert As String
Dim cmdInsert As SqlCommand
Dim dbconn1 As SqlConnection = New SqlConnection("server=server;database=am1stdb;uid=userID;password=password"
strInsert = "update apply4 Set comments=@comments where ID ='34'"
cmdInsert = New SqlCommand(strInsert, dbconn1)
cmdInsert.Parameters.Add("@comments", comments.Text)
dbconn1.Open()
cmdInsert.ExecuteNonQuery()
dbconn1.Close()
Dim strInsert As String
Dim cmdInsert As SqlCommand
Dim dbconn1 As SqlConnection = New SqlConnection("server=server;database=am1stdb;uid=userID;password=password"
strInsert = "update apply4 Set comments=@comments where ID ='34'"
cmdInsert = New SqlCommand(strInsert, dbconn1)
cmdInsert.Parameters.Add("@comments", comments.Text)
dbconn1.Open()
cmdInsert.ExecuteNonQuery()
dbconn1.Close()