I want to Query MsysObjects table programmatically in vc++ to get the name and number of tables in an ms access database.MsysObjects table contain all the info about tables, queries,reports in access database.when i try to query MsysObjects table "Access is denied". How can i query MsysObjects table or in other words how can i get the access to Msystable?
// Build the SQL statement
SqlString = "SELECT Name FROM MsysObjects where type = 1 AND (Left([Name],4) <> \"Msys\") AND (Left([Name],1) <> \"~\")";
// Execute the query
i have to do it programmatically. so simply i just can't do that unless access is granted.however, i have found the solution but i am not able to implement it. i can get the access to MsysObjects table in the following way:
1) Open the database
2) Go to tools-->Options
3) Check the box under show that says system Objects. You will notice that several new tables appear in table view with the prefix MSys - MSysAccessObjects, MSysAces, MSysObjects, MSysQueries, MSysRelationships, and there may be a few others depending on your version of Access.
4) Now Go to Tools-->Security-->User and Group Permissions
5) Select the MSysObjects table and check the box that says "Read Data"
However, i don't know why User and Group Permissions is not enabled
in menu options of my ms access.Can anyone tell me how to get it enabled.