Select to view content in your preferred language

Geodatabase Table to Local DBF file

960
3
03-18-2011 01:55 PM
JoeMadrigal
Occasional Contributor
I was wondering if anybody has any examples or tips that convert a table located in a geodatabase to a local dbf file.  I am switching my project from ArcGIS Desktop to ArcGIS Engine and I was using ExportTable method of IExportOperation to do this, but this object is not supported in ArcGIS Engine.  I was looking at IFeatureDataConverter or IGeoDBDataTransfer, but can't seem to figure if these will work for this.

Any help would be appreciated,
Joe
0 Kudos
3 Replies
VivekPrasad
Deactivated User
I was wondering if anybody has any examples or tips that convert a table located in a geodatabase to a local dbf file.  I am switching my project from ArcGIS Desktop to ArcGIS Engine and I was using ExportTable method of IExportOperation to do this, but this object is not supported in ArcGIS Engine.  I was looking at IFeatureDataConverter or IGeoDBDataTransfer, but can't seem to figure if these will work for this.

Any help would be appreciated,
Joe


Hi,

Try the below sample code

Try
            Dim pAoIni As IAoInitialize = New AoInitialize()
            pAoIni.Initialize(esriLicenseProductCode.esriLicenseProductCodeEngine)

            Dim pGeoProc As ESRI.ArcGIS.Geoprocessor.Geoprocessor = New ESRI.ArcGIS.Geoprocessor.Geoprocessor()
            Dim TableToDBF As ESRI.ArcGIS.ConversionTools.TableToDBASE = New TableToDBASE()

            TableToDBF.Input_Table = "D:\MajetiP\\PGDB.mdb\Table1"
            TableToDBF.Output_Folder = "D:\MajetiP\New Folder"

            pGeoProc.Execute(TableToDBF, Nothing)

        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString())
        End Try

I tested it. It worked fine.
0 Kudos
JoeMadrigal
Occasional Contributor
Wow, that was too easy.  I tried it and it works great.   I'll have to use the geoprocessor more often.
Thank you!
0 Kudos
VivekPrasad
Deactivated User
Great..
Thank you!!
0 Kudos