请教表中插入行数问题
先生您好,我有二列(列1列2)22589行的MDB表,现在列1列2之间添加一列(插入列),并编了代码自动写入,但只能写到9496行为止,随即跳出提示如下:实时错误'-2147217887(80040e21)',文件共享锁定数溢出.(error 3052)我所用的代码是:
Dim FF1cn1 As New ADODB.Connection
Dim FF1rs1 As New ADODB.Recordset
Private Sub form_load()
FF1cn1.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\插入列并写上该列某一常数试验.mdb"
FF1rs1.Open "b1", FF1cn1, 1, 3
End Sub
Private Sub Form_Click()
For I = 1 To 22589
FF1rs1("插入列") = I
FF1rs1.Update
FF1rs1.MoveNext
Next I
End Sub
Private Sub Form_Unload(Cancel As Integer)
FF1cn1.Close
Set FF1rs1 = Nothing
Set FF1cn1 = Nothing
End Sub
(随附附件压缩包),谢谢
MDB表插入一列并写上该列某一常数试验.rar
(100.87 KB)