Show Navigation | Hide Navigation
You are here:
Geoprocessing tool reference > Conversion toolbox > To Geodatabase toolset > Tools

Table To Geodatabase (multiple) (Conversion)

Release 9.2
Last modified April 2, 2008
E-mail This Topic Printable Version Give Us Feedback

Print all topics in : "Tools"


Related Topics

Loads one or more tables into a file geodatabase, personal geodatabase, or ArcSDE geodatabase.


Usage tips

Command line syntax
An overview of the Command Line window
TableToGeodatabase_conversion <Input_Table; Input_Table...> <Output_Geodatabase>

Parameter Explanation Data Type
<Input_Table; Input_Table...>

One or more dBASE, INFO, VPF, OLD DB, or personal, file, and ArcSDE geodatabase tables to be loaded into a personal, file, or ArcSDE geodatabase.

Table View
<Output_Geodatabase>

The output or destination geodatabase. This can be a personal or file geodatabase or and ArcSDE geodatabase.

Workspace
Data types for geoprocessing tool parameters


Command line example

TableToGeodatabase (c:\data\mydbase.dbf ; c:\data\myinfo.dat)  c:\mySDEConnection.sde

Scripting syntax
About getting started with writing geoprocessing scripts
TableToGeodatabase_conversion (Input_Table, Output_Geodatabase)

Parameter Explanation Data Type
Input_Table (Required)

One or more dBASE, INFO, VPF, OLD DB, or personal, file, and ArcSDE geodatabase tables to be loaded into a personal, file, or ArcSDE geodatabase.

Table View
Output_Geodatabase (Required)

The output or destination geodatabase. This can be a personal or file geodatabase or and ArcSDE geodatabase.

Workspace

Data types for geoprocessing tool parameters


Script example

# ConvertDBasesToGDB.py
# Purpose: Convert all the dbf files in a folder to a personal geodatabase
# Requirements: None
# Author: ESRI
# Date: 12/12/03

# Create the Geoprocessor
import arcgisscripting
gp = arcgisscripting.create()

# Set some variables to use in multiple places
inFolder = "c:/data"
outGeodatabase = "c:/junk/x.mdb"
inTables = ""

gp.Workspace = inFolder

tbs = gp.ListTables()
tb = tbs.Next()
while tb:
    if inTables:
        inTables = inTables + " ; " + tb
    else:
        inTables = tb
    tb = tbs.Next()

# Put a try-except-look around the tool, in case an error occurs
try:
    print "Importing the following tables: " + inTables
    gp.TableToGeodatabase(inTables, outGeodatabase)

except:
    # If an error occurred, print the messages returned by the tool
    print gp.GetMessages()

print "FINISHED"

Please visit the Feedback page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.