get the names of all the different user tables in a database
- From: prateek aggarwal <prateekagarwal99@xxxxxxxxx>
- To: programmingblind <programmingblind@xxxxxxxxxxxxx>
- Date: Wed, 27 Oct 2010 10:36:55 +0530
Hi fellow list mates,
for a project, I need to get the names of all the different user
tables in a database.
I’ve been trying to get this worked, but no luck since morning.
The problem is that its an access database, where I don’t have much
prior experience.
I’ve done it successfully in sql, by the following query:
Select * from sysobjects where type = ‘u’
Since access doesn’t have a system table called sysobjects, its
obvious that the command won’t work here.
i got to know that the table MSysObjects is one that contains
information about different database objects in ms access.
Considering this, I’ve passed the following query too, which didn’t execute:
SELECT MSysObjects.Name, MSysObjects.Type FROM MSysObjects WHERE
MSysObjects.Name Not Like 'MsyS*' AND MSysObjects.Type=1
By doing this, I’ve got the following error Message:"Invalid SQL
statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or
'UPDATE'."
Does someone have any idea how can I accomplish this?
I just need to retrieve the names of different tables in a database,
which I will use to populate into a combobox in my c# made user
interface.
Any help will be appreciated.
Regards,
Prateek agarwal.
__________
View the list's information and change your settings at
http://www.freelists.org/list/programmingblind
Other related posts: