ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Create Personal GDB

  • Summary
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Creates a personal geodatabase in a folder.

Usage

Syntax

arcpy.management.CreatePersonalGDB(out_folder_path, out_name, {out_version})
ParameterExplanationData Type
out_folder_path

Location (folder) where the personal geodatabase will be created.

Folder
out_name

Name of the geodatabase to be created.

String
out_version
(Optional)

The ArcGIS version for the geodatabase to be created.

  • CURRENT —Creates a geodatabase compatible with the currently installed version of ArcGIS
  • 10.0 —Creates a geodatabase compatible with ArcGIS version 10
  • 9.3 —Creates a geodatabase compatible with ArcGIS version 9.3
  • 9.2 —Creates a geodatabase compatible with ArcGIS version 9.2
  • 9.1 —Creates a geodatabase compatible with ArcGIS version 9.1
String

Code sample

CreatePersonalGDB Example (Python Window)

The following Python Window script demonstrates how to use the CreatePersonalGDB function in immediate mode.

import arcpy
from arcpy import env

arcpy.CreatePersonalGDB_management("C:/output", "pGDB.mdb")
CreatePersonalGDB Example 2 (Python Window)

The following Python Window script demonstrates how to use the CreatePersonalGDB function in immediate mode to create a personal geodatabase corresponding to a previous release of ArcGIS with the optional Personal GDB version parameter.

import arcpy
from arcpy import env

arcpy.CreatePersonalGDB_management("C:/output", "pGDB.mdb", "9.2")
CreatePersonalGDB Example 3 (Stand-alone Python Script)

The following Python script demonstrates how to use the CreatePersonalGDB function in a stand-alone script.

# Name: CreatePersonalGDB_Example2.py
# Description: Create a personal GDB
# Author: ESRI

# Import system modules
import arcpy
from arcpy import env

# Set workspace
env.workspace = "C:/data"

# Set local variables
out_folder_path = "C:/output" 
out_name = "pGDB.mdb"

# Execute CreatePersonalGDB
arcpy.CreatePersonalGDB_management(out_folder_path, out_name)

Environments

  • Current Workspace
  • Output Spatial Grid 1
  • Output Spatial Grid 2
  • Output Spatial Grid 3
  • Scratch Workspace

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Workspace toolset

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal