标题:[求助] 怎么删除不了啊? vb 操作sql的问题??急.急..................
取消只看楼主
helloboy023
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-6-6
 问题点数:0 回复次数:0 
[求助] 怎么删除不了啊? 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
搜索更多相关主题的帖子: sql 删除 
2007-06-06 16:22



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-145389-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.090529 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved