vb sql 超时已过期 怎么回事啊?
DimsqlAsStringDimconnAsNewADODB.ConnectionDimrsAsNewADODB.Recordsetconn.ConnectionStr...
Dim sql As String
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.ConnectionString = "***************"
conn.Open
sql = "select * from yhb where name='" & Trim(user.Text) & "'"
rs.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs.EOF=ture Then
MsgBox "没有这个用户,请重输入!", vbOKOnly + vbExclamation, "登陆"
user.Text = ""
Else
conn.Execute "delete from yhb where name = '" + Trim(user.Text) + "'"
Adodc1.Refresh
MsgBox "删除成功!"
user.Text = ""
End If 展开
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
conn.ConnectionString = "***************"
conn.Open
sql = "select * from yhb where name='" & Trim(user.Text) & "'"
rs.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs.EOF=ture Then
MsgBox "没有这个用户,请重输入!", vbOKOnly + vbExclamation, "登陆"
user.Text = ""
Else
conn.Execute "delete from yhb where name = '" + Trim(user.Text) + "'"
Adodc1.Refresh
MsgBox "删除成功!"
user.Text = ""
End If 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询