Hello! i'm using ms sql. I had some problem with my update sql statement. Can help me with it? Thanks! There is a syntax error near ')'.
Dim ds As New DataSet
Dim da As New SqlDataAdapter("UPDATE msg SET topicID =(SELECT thread.topicID FROM thread WHERE thread.userID = msg.userID) WHERE (SELECT thread.topicID FROM thread WHERE thread.userID = msg.userID)", cn)
cn.Open()
da.Fill(ds)
cn.Close()
Return ds
Can tell me what wrong with the code? When i debug the page, there is no error. But when i click on the button it show that error.
Thanks!
Tiffany.
Dim ds As New DataSet
Dim da As New SqlDataAdapter("UPDATE msg SET topicID =(SELECT thread.topicID FROM thread WHERE thread.userID = msg.userID) WHERE (SELECT thread.topicID FROM thread WHERE thread.userID = msg.userID)", cn)
cn.Open()
da.Fill(ds)
cn.Close()
Return ds
Can tell me what wrong with the code? When i debug the page, there is no error. But when i click on the button it show that error.
Thanks!
Tiffany.