By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

Accessing MS Access database catalog using SQL

P: 2
Hi,

Is it possible to use SQL to get a database's structure, like
Expand|Select|Wrap|Line Numbers
  1. SHOW TABLES
in MySQL? I'd like to create a database access interface for MS Access databases in JSP/Java Servlets and I need to be able to access the database structure. Of course, I would port this to other languages as well, but since I'm learning JSP/Servlets I'd like to start with that for the time being.

Thanks in advance
Oct 30 '06 #1
Share this Question
Share on Google+
3 Replies


Andrew Thackray
P: 76
Tables and everything else are stored in the hidden table msysObjects.

If in Tools>Options you ckeck the show system objects you will be able to see the table in the tables tab.

The SQL to list user tables is

Expand|Select|Wrap|Line Numbers
  1.  
  2. SELECT Name as TableName from msysobjects where type = -32768
  3.  
Oct 30 '06 #2

P: 2
Hey,

Thanks for the quick reply, when I tried that query, this was the response I got:
Expand|Select|Wrap|Line Numbers
  1. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Record(s) cannot be read; no read permission on 'msysobjects'.
  2.  
Any idea as to how I can acquire read permission on that table?

Thanks in advance
Oct 30 '06 #3

Andrew Thackray
P: 76
Try making the table visible in ms access. In the access database do the following

ools>Options check the show system objects you should be able to see the table in the tables tab.

If this does not work try putting the sql

SELECT Name as TableName from msysobjects where type = -32768

into an access query. If the query runs (it does on my version) then you call the query in your Java code.
Oct 31 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.