Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2007-12-06
2
Medium Priority
?
1,943 Views
Last Modified: 2012-08-13
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
Comment
Question by:KnowledgeWare
2 Comments
 
LVL 52

Accepted Solution

by:
Gustav Brock earned 1500 total points
ID: 20421125
0
 

Author Closing Comment

by:KnowledgeWare
ID: 31413185
Thanks! I'm not sure we can do this but the info was helpful.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question