Blog

Get Version of Geodatabase using ArcObject.

Posted by Yogesh Sharma Blogs | ArcObject Nov 05, 2012
Get Version of Geodatabase using ArcObject.

Check Version of File Geodatbase/Personal  geodatabse using ArcObject-

We have File Geodatabase of Personal Geodatabase and we want to check version of That Geodatabase.

IWorkspaceFactory pwsf = new AccessWorkspaceFactoryClass();

IWorkspace pws = pwsf.OpenFromFile(@"E:\ARC_PRACTICE\Sample_data\FP_MDBs\FL_01.mdb", 0);

IGeodatabaseRelease2 pGeorel = pws as IGeodatabaseRelease2;

int majVer= pGeorel.MajorVersion;

int minVer = pGeorel.MinorVersion;

 

here majver have values 1,2,3  means major version is 7 plus that number-

if majver is 1 means version is 8.X

if majver is 2 means version is 9.X

if majver is 3 means version is 10.X

if minver is 1 and majver=1 means version is 8.1.

if minver is 2 and majver=2 means version is 9.2.

if minver is 0 and majver=3 means version is 10.0.

 

 

 

post comment
     
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
Get Career Advice from Experts
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.