[求助] 怎么删除不了啊? vb 操作sql的问题??急.急..................
想要把text3和4中的内容插入表ip,在5秒后再删除,可是怎么删除不了啊??? 郁闷死了.... Private Sub Command2_Click()
Dim conn As Adodb.Connection
Dim rs As Adodb.Recordset
Dim SQLstr As String
Dim StrCnn As String
Set conn = New Adodb.Connection
conn.Open "driver={sql server};database=DNS;server=(local);uid=;pwd="
Set rs = New Adodb.Recordset
rs.CursorLocation = adUseClient
SQLstr = Text4.Text
StrCnn = Text3.Text
rs.Open "INSERT INTO ip(ipaddress,domainaddress) values ('" & SQLstr & "','" & StrCnn & "') ", conn, 1, 3
Timer2.Enabled = True
If Timer2.Interval >= 5000 Then
StrCnn = Text3.Text
rs.Open "DELETE FROM ip where domainaddress='" & StrCnn & "') ", conn, 1, 3
End If
End Sub