Cannot open database..."file maybe corrupt"
After running the code on a form...I'm getting this error message. Run-Time Error "3049"
The code runs for about 100K rows and then this message comes on. I'm trying to update this table with about 300K products.
Please help.
Private Sub Command0_Click()
Dim rsF As Recordset
Dim rs1 As Recordset
Dim rs2 As Recordset
Set rsF = CurrentDb().OpenRecordset("Select * from FinalTable order by ProductCode")
Set rs1 = CurrentDb().OpenRecordset("Select * from Catalog_08222015 order by productCode")
Set rs2 = CurrentDb().OpenRecordset("Select * from Catalog_08012015_orig order by ProductCode")
Do While rs1.EOF = False
rsF.AddNew
rsF("ProductCode") = rs1("ProductCode")
rsF("Product_Group") = rs1("Product_Group")
rsF("Manufacturer") = rs2("ProductManufacturer")
rsF("CatID") = rs1("CatID")
rsF.Update
'rsF.MoveNext
rs1.MoveNext
rs2.MoveNext
Loop
MsgBox "End job"
Set rsF = Nothing
Set rs1 = Nothing
Set rs2 = Nothing
End Sub
After running the code on a form...I'm getting this error message. Run-Time Error "3049"
The code runs for about 100K rows and then this message comes on. I'm trying to update this table with about 300K products.
Please help.
Private Sub Command0_Click()
Dim rsF As Recordset
Dim rs1 As Recordset
Dim rs2 As Recordset
Set rsF = CurrentDb().OpenRecordset("Select * from FinalTable order by ProductCode")
Set rs1 = CurrentDb().OpenRecordset("Select * from Catalog_08222015 order by productCode")
Set rs2 = CurrentDb().OpenRecordset("Select * from Catalog_08012015_orig order by ProductCode")
Do While rs1.EOF = False
rsF.AddNew
rsF("ProductCode") = rs1("ProductCode")
rsF("Product_Group") = rs1("Product_Group")
rsF("Manufacturer") = rs2("ProductManufacturer")
rsF("CatID") = rs1("CatID")
rsF.Update
'rsF.MoveNext
rs1.MoveNext
rs2.MoveNext
Loop
MsgBox "End job"
Set rsF = Nothing
Set rs1 = Nothing
Set rs2 = Nothing
End Sub