If (rs4.RecordCount = 0) Then MsgBox "數(shù)據(jù)庫中無此記錄!" Else dim i as long dim ac_Tmp as new adodb.connection With ac_Tmp If .State = adStateOpen Then .Close .ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\aaa.mdb;Mode=ReadWrite;Persist Security Info=False" .Open End With for i=1 to rs4.recordcount ac_Tmp.execute " insert into [111](newid,aa) values('" & rs4(0) & "'," & rs4(1) & ")" rs4.movenext next i ac_tmp.close END IF End Sub |
|