How to get the structure of a table?

N

nano2k

Hi

I need to display the structure of a table in an MS Access database.
I'm using dotnet framework 2.0.

Thanks.
 
M

Michel Walsh

I never used those features, since I work on very well known database, and
with MSDataSetGenerator. While, in the end, it depends on what you are
interested to get, we can explore, as example, the ADONet FillSchema method,
which will also set the properties AutoIncrement, AllowDBNull and MaxLength
on each columns returned. The exact method(s) you will have to use are,
indeed, more relevant to the framework and ADONet, in itself, than to an
"Access" database. An Access database does not expose all its structures as
MS SQL Server would, through stored procedures. So, you are 'reduced' to use
the framework, but then, you gain in generality, since it won't be exclusive
to one db-engine.


Vanderghast, Access MVP
 
N

nano2k

I see, thanks for reply.

I decided to use DAO objects to access and also ***modify*** the
structure of the database on the fly.
Of course, no major changes, but very useful (like adding/modifying/
deleting a field, etc).
I see the point regarding the generality, but my app is a simple one,
one MDB file is great for that, no need for a db server.

Tanks again.
 
Top