Paul Ked
Active Member
- Joined
- Jun 4, 2015
- Messages
- 442
Hi all
I'm getting the above error on a new PC I'm setting up, it doesn't happen with the other PC's in use with the same code!
The 'read-only' error occurs on the line in red, but everything before it executes without error.
Any ideas?
Best regards
Paul Ked
I'm getting the above error on a new PC I'm setting up, it doesn't happen with the other PC's in use with the same code!
Code:
With CreateObject("ADODB.Connection")
.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=K:\KKDB.accdb;"
.Execute "INSERT INTO TestOpen (TestField) VALUES ('" & Sett.Cells(42, 2) & "') "
.Execute "DROP TABLE Goodsbackup;"
.Execute "SELECT * INTO GoodsBackup FROM Goods"
.Execute "DELETE FROM Goods;"
[COLOR=#ff0000] .Execute "INSERT INTO Goods SELECT * FROM [Excel 8.0;HDR=YES;DATABASE=" & ThisWorkbook.Name & "].[DBGoods$]"
[/COLOR] .Close
End With
The 'read-only' error occurs on the line in red, but everything before it executes without error.
Any ideas?
Best regards
Paul Ked