[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1962
  • Last Modified:

OleDbConnection.GetSchema() returns COLUMN_FLAGS, but how do I read them to ID primary keys, autoincrement, etc?

I'm using C#, and I need to build an application that will read the schema of one Access 2003 database and compare it to that of another (and finally, modify one until it's the same shape as the other. I'm fairly certain this is possible as the OleDbConnection.GetSchema() method returns a datatable with all the relevent information. Then executing CREATE/ALTER/DROP commands all over the place should allow me to modify the schema to my heart's content, right?

Anyways, the problem I'm actually having is in getting the column info. Apparently a lot of it is stored in a flagged enumeration in the COLUMN_FLAGS column. Information about he column like auto-increment, primary key, etc, etc, is being returned to me as a single integer. Plenty of websites and articles agree on this, but none I've been able to find will tell me which bits mean what. Does anybody know / know where I can find this out?
0
KnowledgeWare
Asked:
KnowledgeWare
1 Solution
 
KnowledgeWareAuthor Commented:
Thanks! I'm not sure we can do this but the info was helpful.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now