dbrandon

IWorkspaceFactory.Copy() Clarification

Discussion created by dbrandon on Jul 9, 2010
Latest reply on Feb 2, 2011 by Neil
Hello everyone.  I am trying to use the Copy method in IWorkspaceFactory to make a copy of of a geodatabase.  My understanding of the parameters are as follows:

WorkspaceName - an IWorkspaceName that represents the source geodatabase.
DestinationFolder - a string representing where the copy will be made.
WorkspaceNameCopy - an IWorkspaceName that represents the target geodatabase.

If this is correct, then why when I format the call to the method as:

sourceWorkspaceFactory.Copy(sourceWSName, "PathToWorkspace", out targetWSName);

I get a copy of the source geodatabase in the correct directory however the name of the target geodatabase is the same as the source except it has "_x" appended to it (where x is a number depending on how many copies are in the directory).

Am I missing something on that last parameter?

Thanks.

Outcomes