name & count of tables in a MS Access database
-
Could u tell me how to get name and count of tables in a MS Access database? I tried by MSysObjects but i have an error. Error says that to use administrator account. But i have used just an administrator account one. Could u tell me any other ways for that matter.
-
Could u tell me how to get name and count of tables in a MS Access database? I tried by MSysObjects but i have an error. Error says that to use administrator account. But i have used just an administrator account one. Could u tell me any other ways for that matter.
PiebaldConsultant gave you and Answer yesterday[^]. If you want more help you will need to be more specific: 1) Did you try his suggestion it should work- if not what went wrong 2) How are you accessing
MSysObjects
(supply code)? Point 2 is most important as there are several scenarios: A: You are accessing the table directly in which case you need to be an admin on the database B: You are accessing via an application If this is using windows authentication to the database: The account the app is running under needs to be an admin on the database. For a winforms app, it would be running under your account. Web apps are more complicated and you'll need to work out which account is being used. If this is using an "SQL account" (i.e. you have supplied a username and password)to the database: The account specified needs to be an admin on the databaseSort of a cross between Lawrence of Arabia and Dilbert.[^]
-Or-
A Dead ringer for Kate Winslett[^] -
Could u tell me how to get name and count of tables in a MS Access database? I tried by MSysObjects but i have an error. Error says that to use administrator account. But i have used just an administrator account one. Could u tell me any other ways for that matter.
There is "SYS" in MSysObjects, no wonder you need a special account when going that route. Stick with OleDbConnection.GetSchema() as Piebald told you. :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
-
Could u tell me how to get name and count of tables in a MS Access database? I tried by MSysObjects but i have an error. Error says that to use administrator account. But i have used just an administrator account one. Could u tell me any other ways for that matter.
I strongly recommend avoiding database-specific techniques. ADO.net includes interfaces and base classes that make database-agnostic access very easy to accomplish.
-
Could u tell me how to get name and count of tables in a MS Access database? I tried by MSysObjects but i have an error. Error says that to use administrator account. But i have used just an administrator account one. Could u tell me any other ways for that matter.
phowarso wrote:
Error says that to use administrator account.
But i have used just an administrator account one.That's not refering to an admin account on the machine. That's refering to the designated administrator account in the database. The two are not the same thing. Seriously, follow the advice given yesterday. You're trying to do it the hard way.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak