Error with ArcEngine 10.3 Mapping

01-12-2015 04:53 AM
New Contributor

I have just move over to Arc Engine 10.3 from 10.2 and re-compiled the software, but I am now getting an error being thrown up when trying to create A GDB File.

I am using the following code, it create the blank File GDB Database but when it comes to the workspaceFactory.Open instruction it throws up a COM Exception error of 0x80040228



IWorkspaceName workspaceName;


            propertySet = new PropertySetClass();

            workspaceFactory = new FileGDBWorkspaceFactory();



            DirectoryInfo di = new DirectoryInfo(directory + @"\" + fileName + ".gdb");

            if (di.Exists)






                workspaceName = workspaceFactory.Create(amsDir, fileName + ".gdb", null, 0);




            propertySet.SetProperty("DATABASE", amsDir + @"\" + fileName + ".gdb");

            workspace = workspaceFactory.Open(propertySet, 0);


            IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)workspace;




Under the license I am using the same as the 10.2 version ( ArcEngine & ArcEngine Enterprise GeoDatabase )

The ArcGIS administrator is showing that I have the EDN Subscription covering 10.3


I need a solution ASAP.


Paul Cole

Tags (2)
0 Kudos
1 Reply
Regular Contributor II

Have you tried using the Activator to instantiate the workspace?

  // Instantiate a file geodatabase workspace factory and create a file geodatabase.

  // The Create method returns a workspace name object.

  Type factoryType = Type.GetTypeFromProgID(


  IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance


  IWorkspaceName workspaceName = workspaceFactory.Create(path, "Sample.gdb", null,


   // Cast the workspace name object to the IName interface and open the workspace.

  IName name = (IName)workspaceName;

  IWorkspace workspace = (IWorkspace)name.Open();

   return workspace;

Creating Geodatabase

0 Kudos