Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
First,Create tst.mdb on drive D,then create a table named Table1,insert some data。Why it ONLY deletes 2 record? not all of them? Thanks a lot!
Dim myConn As ADODB.Connection
Dim myRecord As ADODB.Recordset
Private Sub Form_Load()
Form1.Visible = True
Set myConn = New ADODB.Connection
myConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d: st.mdb;Persist Security Info=False"
Set myRecord = New ADODB.Recordset
myRecord.Open "select * from Table1", myConn, adOpenDynamic, adLockOptimistic
Do Until myRecord.EOF
Private Sub Form_Unload(Cancel As Integer)
Set myRecord = Nothing
Set myConn = Nothing
0 · ·