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.




Hire Mobile & Web Developer on demand. 100% satisfaction. Try for 1 week or Money Back. Local and remote developers available all over USA.
  • MCN is your source for developing solutions involving websites, mobile apps, cloud-computing, databases, BI, back-end services and processes and client-server applications.
Employers - Post Free Jobs