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);
Solved! Go to Solution.
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory"); IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType); IPropertySet props = new PropertySetClass(); props.SetProperty("instance", "sde:oracle10g:elisadev_sigmarer.core.it"); props.SetProperty("user", "..."); props.SetProperty("password", "..."); IWorkspace pWorkspace = workspaceFactory.Open(props, 0); ISqlWorkspace sqlWorkspace = pWorkspace as ISqlWorkspace;
Type factoryType = Type.GetTypeFromProgID("esriDataSourcesGDB.SdeWorkspaceFactory"); IWorkspaceFactory workspaceFactory = (IWorkspaceFactory)Activator.CreateInstance(factoryType); IPropertySet props = new PropertySetClass(); props.SetProperty("instance", "sde:oracle10g:elisadev_sigmarer.core.it"); props.SetProperty("user", "..."); props.SetProperty("password", "..."); IWorkspace pWorkspace = workspaceFactory.Open(props, 0); ISqlWorkspace sqlWorkspace = pWorkspace as ISqlWorkspace;