Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Following example through ESRI is to access the features of file geodatabase (GDB) ,

i would like to know that is there a similar way to do this with personal geodatabase (MDB) using java .

I am quite new to arcObjects so if anybody could point me to right direction.

Thanks in advance///

share|improve this question
Are you wedded to Personal Geodatabases rather than File Geodatabases? There is a Q & A available about their relative virtues. – PolyGeo May 30 '13 at 6:04
Its not like "WEDDED", its just a tool generation to handle both geodatabase , so no PRO CONS . – NewBee May 30 '13 at 6:07
up vote 3 down vote accepted

You can use the AccessWorkspaceFactory instead. There are (at least) 3 ways to connect to a personal geodatabase. The simplest is probably the IWorkspaceFactory.OpenFromFile method, e.g.:

//For example, pathToFile= "C:\\myData\\mypGDB.mdb".
static IWorkspace openFromFile_pGDB_Workspace(String pathToFile)throws Exception{
    IWorkspaceFactory workspaceFactory = new AccessWorkspaceFactory();
    return workspaceFactory.openFromFile(pathToFile, 0);

See How to connect to a geodatabase in the conceptual help for more information.

You might also look at the various IGPUtilities helper methods if you want to deal with opening workspaces, feature classes, tables, etc. in a more generic way.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.