Database or object is read only
Hi,
I keep getting an error message that the database is read only. I have done quite a bit with the folder and the database to allow access. I pretty sure the problem lies within the code.
Dim cnn As New ADODB.Connection
Dim rst As New ADODB.Recordset
cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Users\Wutcha\Desktop\WutchaKnow\NamesAnd Numbers.mdb"
rst.Open "SELECT DISTINCT [Company], [Website], [UserName], [Password], [QuestionA], [AnswerA], [QuestionB], [AnswerB], [QuestionC], [AnswerC] FROM Passwords ORDER BY [Company];", _
cnn, adOpenKeyset, adLockPessimistic
rst.AddNew
Do Until rst![Company] = Null
rst.MoveNext
Loop
rst.Close
cnn.Close
Set rst = Nothing
Set cnn = Nothing
Any suggestions will be much appreciated. Thanks in advance!
|