Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

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,914 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 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
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.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

730 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