nazereh

IWorkspaceFactory->openfromfile , NULL result for Workspace output

Discussion created by nazereh on Jan 27, 2012
Latest reply on Jan 28, 2012 by nazereh
Hey all,

I tried sample codes to open a File GDB Workspace which already exists with the name testGDB.gdb:
there is also a sample in EDN, I have ArcGIS 10, Visualstudio 2008.
I always get NULL result for the variable "outWorkspace", that is why I cant get any pointer to create a feature class inside the GDB.
Is there something I am missing !? any hint !????
I have checked several times, there is no problem with my path ! because the testGDB.gdb is created directly by ArcGIS
connString is in my case : C:\Daten\Bearbeitung\testGDB.gdb which goes with the codes.

http://resources.esri.com/help/9.3/arcgisdesktop/com/samples/Geodatabase/Accessing_Data/07EA5491-885D-498A-9794-46E9202DB246.htm

HRESULT openFGDBWorkspace(BSTR connString, IWorkspace** outWorkspace)
{
      IWorkspaceFactoryPtr ipWorkspaceFactory(CLSID_FileGDBWorkspaceFactory);
      return ipWorkspaceFactory->OpenFromFile(connString, NULL, outWorkspace);
}

thanks for any help.
Nazereh

Outcomes