RE: get the names of all the different user tables in a database

  • From: D!J!X! <megamansuperior@xxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Wed, 27 Oct 2010 02:19:58 -0400

Doesn't Access support tables names as well? I remember making database when
I was starting out with coldFusion on access and being able to create my own
tables and give them my own names.

HTH, D!J!X!

-----Original Message-----
From: programmingblind-bounce@xxxxxxxxxxxxx
[mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of prateek aggarwal
Sent: Wednesday, October 27, 2010 1:07 AM
To: programmingblind
Subject: get the names of all the different user tables in a database

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
//www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at 
//www.freelists.org/list/programmingblind

Other related posts: