how do I copy feature classes with attachments to another database

7914
6
01-09-2015 06:10 AM
CameronDodds
New Contributor II

I have tried the copy paste method. It gives me an error (one or more objest failed to paste. FDO error: -2147483638). I am able to copy just the personal database feature class but it does not bring the related attachment table.

0 Kudos
6 Replies
CameronDodds
New Contributor II

More detail.  I have a Personal Geodatabase Feature Class, Table, and Relationship Class that I want to move to a File Geodatabase.

0 Kudos
MarceloLandivar1
New Contributor

Have you tried to export to an XML workspace document and then import it?

If this does not work neither and you are on a hurry, you probably must (I think this could work but I haven´t tried it):

  • Create and update an auxiliary field in the pDGB attchments table to recreate the relations
  • Create just the schema in the fGDB
  • Load the data from pGDB to the fGDB. Use the Append geoprocessing tool.
  • Update foreign key in the fGDB attachments table to recreate the relations
  • Delete the auxiliary field

Hope it works!

Marcelo Landivar

Azimut Soluciones

0 Kudos
CameronDodds
New Contributor II

Marcelo,

Thanks for responding.

I tried the export XML workspace document and get the message "Export Failed."

Could you possibly give me step by step instructions for the other option to complete this task?

  • I was able to create the aux field in the PGDB.
  • Need instructions for the schema creation in FGDB
  • I know how to do the append
  • Need instruction how to update the foreign key in the FGDB attachments table to recreate the relations
  • I know how to delete the field.
CameronDodds
New Contributor II

Thanks Sol,

I get the following error code when  export to XML Workspace.

Messages

Executing: ExportXMLWorkspaceDocument "C:\PSC AutoCAD Files\CARGILL\PSC.mdb\STORM_SEWER_MH" "C:\PSC AutoCAD Files\XML'S\STORM MANHOLES.xml" DATA BINARY METADATA

Start Time: Fri Jan 09 12:47:58 2015

Exported to C:\PSC AutoCAD Files\\XML'S\STORM MANHOLES.xml:

...STORM_SEWER_MH

...STORM_SEWER_MH__ATTACHREL

...STORM_SEWER_MH__ATTACH

ERROR 999999: Error executing function.

Failed to execute (ExportXMLWorkspaceDocument).

Failed at Fri Jan 09 12:48:03 2015 (Elapsed Time: 4.87 seconds)

0 Kudos
CameronDodds
New Contributor II

Sol,

Thanks for your help. I believe you are correct. Something with that dataset. I am able to use the XML transfer with some of the other data with attachments. Thanks for getting me this far. I will review the data with the ones that get that error message. Thanks again.

0 Kudos
CameronDodds
New Contributor II

Sol,

The PGDB was not used for GPS data collection.