2个回答
展开全部
Private Sub Command1_Click()
Dim cn As New ADODB.Connection
Dim SqlStr As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLEDB:Database Password=123"
For i = 0 To List1.ListCount - 1
cn.Execute "INSERT INTO 会员消费 (会员编号) VALUES ('" & List1.List(i) & "');"
Next i
cn.Close
Set cn = Nothing
End Sub
Dim cn As New ADODB.Connection
Dim SqlStr As String
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\db1.mdb;Mode=ReadWrite;Persist Security Info=False;Jet OLEDB:Database Password=123"
For i = 0 To List1.ListCount - 1
cn.Execute "INSERT INTO 会员消费 (会员编号) VALUES ('" & List1.List(i) & "');"
Next i
cn.Close
Set cn = Nothing
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询