get column information in access

  • Thread starter Thread starter Naure
  • Start date Start date
N

Naure

Hi guys, i am trying to get column information in an access database, is
there any one knows how do we write query on that?

what i m trying to do is to check on a table within the database, and
confirm that there is a column called "Name" and the datatype is text(254)

and is there any place that i can find some reference on queries in access?

thanks a lot
 
"Name" is a reserved word in Access ... what Access thinks you mean and what
you think you mean may not match.

Access HELP has information on queries.

Search on-line for "MS Access" and "query".

Check the mvps.org/access website.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
but how do i get column information in a table ?
in sql server, we have something like:
"SELECT * FROM information_schema.COLUMNS WHERE table_name = 'TableName' and
COLUMN_NAME = 'FieldName'"

but we seem do not have such thing in access

i searched the access help on querires, there is no information about geting
column information (e.g. name of the column, datatype of the column)

thanks a lot
 
Hi guys, i am trying to get column information in an access database, is
there any one knows how do we write query on that?

what i m trying to do is to check on a table within the database, and
confirm that there is a column called "Name" and the datatype is text(254)

and is there any place that i can find some reference on queries in access?

thanks a lot

Access doesn't have the familiar information schemas. You will need to use VBA
code to examine the Tabledef object. Open the VBA editor and search the help
for Tabledef; the tabledefs collection contains all the tables, each of which
has a Fields collection.
 
I need to do the checking prgrammatically in my windows application writen by
c#. so i would have to do it using query or playing with
Microsoft.Office.Interop.Access.Application objects :(

any ideas?

thanks a lot
 
so i would have to do it using query or playing with
Microsoft.Office.Interop.Access.Application objects :(

The latter. There is simply no (documented and usable) table containing the
information that you seek.
 
i found a solution,
there is metadata stored in a datareader, i can retrive the column
information from that metadata.

thank you all for your help.
 
Back
Top