AnsweredAssumed Answered

10.2 SqlWorkspaceFactory Error

Question asked by Francesco.Sinergis on Sep 25, 2013
Latest reply on Sep 26, 2013 by Francesco.Sinergis
Hello,

in 10 and 10.1 i have an AddIn wich opens an SqlWorkspaceFactory and then loads some QueryLayers based on custom code, everything is working smoothly.

What is failing, in 10.2, is the code wich opens the Workspace from the WorkspaceFactory, with a generic E_FAIL error

For testing purposes i created a new addin with a single button using 10.2 sdk and tried to open the same workspace withot anything else, the same error is returned, here is the code:

Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SqlWorkspaceFactory");  IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType);  IPropertySet props = new PropertySetClass(); props.SetProperty("DBCLIENT", "Oracle10g"); props.SetProperty("SERVERINSTANCE", "..."); props.SetProperty("AUTHENTICANTION_MODE", "DBMS"); props.SetProperty("USER", "..."); props.SetProperty("PASSWORD", "...");  IWorkspace pWorkspace = workspaceFactory.Open(props, 0);


The full error is:
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.

Note that:
- tnsping on the server instance is working
- the same db from a 10 or 10.1 machine is working
- user and password are the same and working
- sql plus connection on the machine is working
- oracle client version is the same between 10, 10.1 and 10.2

Any clue about this error?

Thanks in advance

Fra

Outcomes