SqlWorkspaceFactory deprecated in 10.1??? error -2147180283

2710
1
08-24-2015 01:39 PM
MarceloJury
New Contributor

Hello

Can anyone help me with this issue?

I have an instance sde:oracle11g and I'm trying to make a simple select from sample taken from here, using

     SqlWorkspaceFactory but cannot understand ERROR CODE -2147180283

Imports ESRI.ArcGIS.Geodatabase

Imports ESRI.ArcGIS.esriSystem

Imports ESRI.ArcGIS.ADF.Connection.Local

Imports ClassLibrary1.GenericObjectPoolVB

Imports ESRI.ArcGIS.Geometry

Dim con2 As IWorkspace = (I have an object pool here that returns me propper workspace object, and I name it as con2)

Dim sqlWorkspace As ISqlWorkspace = CType(con2, ISqlWorkspace)

' Construct a SQL query.

  Dim queryBuilder As StringBuilder = New StringBuilder()

  queryBuilder.Append("SELECT * ")

  queryBuilder.Append("FROM " + listView1.FocusedItem.Text)

  Dim query As String = queryBuilder.ToString()

  Using comReleaser As ESRI.ArcGIS.ADF.ComReleaser = New ESRI.ArcGIS.ADF.ComReleaser() 'is this correct reference? deprecated?

      ' Create the query cursor.

       Dim featureCursor As IFeatureCursor = CType(sqlWorkspace.OpenQueryCursor(query), IFeatureCursor)

       comReleaser.ManageLifetime(featureCursor)

     ' Iterate through the features.

       Dim feature As IFeature = featureCursor.NextFeature() ' HERE ERROR IS COMException was unhandled ERROR CODE -2147180283

0 Kudos
1 Reply
MarceloJury
New Contributor

Hello, I've discovered this issue, and was related to a wrong oracle client installation, in fact a mismatched version, the reason to post was just a confusing ERROR CODE -2147180283.... thanks anyway.

0 Kudos