Solved

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

Posted on 2007-12-06
2
1,821 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 49

Accepted Solution

by:
Gustav Brock earned 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now