报错:第 1 行: '=' 附近有语法错误。
代码:
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' 在新会话启动时运行的代码
Application.Lock()
Application( "countpeople ") = Convert.ToInt32(Application( "countpeople ")) + 1
Application( "countonline ") = Convert.ToInt32(Application( "countonline ")) + 1
Application.UnLock()
Dim connstr As String
Dim conns As SqlConnection
conns = New SqlConnection( "server=localhost;uid=sa;pwd=;database=myweb ")
conns.Open()
Dim sqls As String = "updata count set num=1 "
Dim cmd As SqlCommand
cmd = New SqlCommand(sqls, conns)
cmd.ExecuteNonQuery()
conns.Close()
End Sub
看来看去没有问题啊,晕头了
------解决方案--------------------updata ==> update
------解决方案--------------------呵呵 我当年也犯过同样的错误,当年我就是把update拼写错了 我足足找了半天也没找出毛病,最后还是请教别人找到错误。
------解决方案--------------------有创意的错误
改了就好了