'載入資料庫 所需引用相關變數
Dim conn2 As New ADODB.Connection
Dim rs2 As New ADODB.Recordset
Dim SqlString As String
Dim i As Integer
conn2.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & ThisWorkbook.Path & "\holidaydb.MDB"
SqlString = " select * From [DB] "
rs2.Open SqlString, conn2, adOpenKeyset, adLockOptimistic
rs2.MoveLast
rs2.Delete
rs2.Update
MsgBox "您已成功刪除[剛才建立的資料]!"
>>>>>>
While not rs2.eof
xxxxxxxxxxxxx
rs2.movenext
wend
沒有留言:
張貼留言