I wrote a script to download mdb files and read them due to the OLEDB provider. Everything works fine, but if I try to read from a table this throws an exception:
Access to Ms: record (s) cannot be read; no read permission for tblMytable
var cmd = new OleDbCommand("SELECT * FROM tblMytable", conn); var reader = cmd.ExecuteReader();
I changed the permissions directly in Ms Access for the user "administrator" and it works. But the problem is that this musst script runs twice a day and it downloads about 20 files. Therefore, it is not possible to manually change permissions.
Can I programmatically change read permissions for a table?
Thanks so much for any ideas!
source share