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,889 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 51

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.

623 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