Creating and Populating A Geodatabase

Last Modified:5/1/2002

This sample creates a new Personal GeoDatabase and then executes various functions that populate and configure the database suitably to support a utility application. The resultant database created is similar to the Greeley database used in the tutorials. The VB.Net and C# version demonstrates using a XML file to get the metadata needed to construct the geodatabase.

The steps that are executed are as follows:

How to use:
  1. Start MS Visual Basic 6 and open the project file BuildGreeley.vbp (for the VB.Net and C# version, start MS Visual Studio .Net and open the solution file CreateAndPopulateAGeodatabase.sln).
  2. The project must be compiled to an EXE. From the File menu select Make (for the VB.Net and C# version, from the Build menu select Build Solution). This will create the EXE.
  3. Execute the compiled program.
  4. When the form appears press the GO! button. This will execute the various steps outlined above.
  5. Inspect the resultant Personal GeoDatabase using either ArcMap or ArcCatalog, and examine the various database entries created.


Difficulty: Intermediate

Visual Basic Visual Basic.NET C#
File Description
BuildGreeleyFunctions.bas Visual Basic Module containing functions.
frmMega.frm VB Form file defining UI.
BuildGreeley.vbp VB Project File for sample.
BuildGreeley.exe Compiled project application.

Key Interfaces: IDatasetName, IFeatureClassName, IFeatureDatasetName, IFeatureWorkspace, IFieldChecker, IFields, IGeographicCoordinateSystem, IGeometryDef, IGeometryDefEdit, IName, IProjectedCoordinateSystem, IPropertySet, ISpatialReference, ISpatialReferenceFactory, IVersionedObject, IWorkspaceFactory, IWorkspaceName