Unable to View data from a View

3351
3
05-20-2015 02:47 PM
Highlighted
New Contributor III

Hi,

   I have a SQL Server View in SQL Server 2008. The view is created and the results can be retrieved in the SQL Server. Now when I am going to connect SQL Server through OLEDB Connection in Arc Catalog I am not able to see the data associated with the view. Is it a restriction of Arc Catalog for not to able to see the View or there's some other option to view it. I am using the same credential information as when I use SQL Server to create View and connect to the Arc Catalog and go thru the OLEDB SQl Server connection. Using ArcGIS 10.0 & SQL Server 2008 R2.

Thanks in advance. Any help will be apprecitated.

Reply
0 Kudos
3 Replies
Highlighted
Esri Esteemed Contributor

Hi Ramakrishna,

You won't be able to view spatial information through an OLE DB Connection.  Create a connection to the database by clicking on 'Add Database Connection' under 'Database Connections' and you should be able to view the geometry of the view.  The geometry will need to be a SQL Native type, i.e. Geometry or Geography.

Highlighted
Esri Esteemed Contributor

As Jake said, in order to view geometry you need a geometry-aware connection, but in addition, you need an integer column in the view that will be recognized as a rowid column.  Rowid columns are:

     1) 32-bit integer type

     2) NOT NULL

     3) Contain unique values across the query

     4) Return the same value for a given row, no matter what WHERE clause is applied

If the root geometry table is an enterprise geodatabase (ArcSDE) feature class, then the objectid column on that table can generally be used (the exception is if a join will result in a one-to-many expansion, in which case the rowid must come off the many side).

- V

Highlighted
New Contributor III

Hi All,

Thanks for your recommendations but actually you can view the view without geometry field in arc catalog. I'd an issue with one of the field which had a space and it was causing the issue.

Reply
0 Kudos