I have a situation where I need to issue a GRANT statement from a VB program interacting with an MS-Access database. So far I have:
Code:
Dim myAccess as New Access.Application
myAccess.OpenCurrentDatabase("myAccess.mdb")
myAccess.DoCmd.RunSQL("GRANT SELECT ON TABLE MSysObjects TO PUBLIC")
(This is to allow me to ready the MSysObjects table from vb.net, which otherwise fails with a permissions error.)
But this fails on the last line with the error: Invalid SQL Statement: Expected DELETE, INSERT, PROCEDURE, SELECT or UPDATE
So, the question is, how can I run the GRANT statement?