Interface ISqlWorkspace

Namespace
ESRI.ArcGIS.Geodatabase
Assembly
ESRI.Server.Geodatabase.dll

Query layer workspace interface

[Guid("EED692F3-04E5-42D8-A232-4AAD0085E471")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface ISqlWorkspace

Remarks

A SQL workspace is a relational database that may or may not be a geodatabase. After creating a workspace with the SqlWorkspaceFactory class (and the IWorkspaceFactory interface), this interface is used to retrieve data in a read-only manner as query classes and query cursors. Query classes can be used much like tables or feature classes from other data sources; through ArcMap, they are exposed as "Query Layers".

Methods

CheckDatasetName(string, IQueryDescription, out string)

Returns unique name in the workspace.

void CheckDatasetName(string Name, IQueryDescription QueryDescription, out string newName)

Parameters

Name string
QueryDescription IQueryDescription
newName string

GetColumns(string, out IStringArray, out IStringArray, out IVariantArray, out ILongArray, out ILongArray, out ILongArray)

Returns column information for a table.

void GetColumns(string TableName, out IStringArray columnName, out IStringArray columnType, out IVariantArray IsNullable, out ILongArray Size, out ILongArray Precision, out ILongArray Scale)

Parameters

TableName string
columnName IStringArray
columnType IStringArray
IsNullable IVariantArray
Size ILongArray
Precision ILongArray
Scale ILongArray

GetQueryDescription(string)

Get query properties including spatial based on the first record of the query.

IQueryDescription GetQueryDescription(string Query)

Parameters

Query string

Returns

IQueryDescription

GetTables()

Returns names of all the table.

IStringArray GetTables()

Returns

IStringArray

OpenQueryClass(string, IQueryDescription)

Returns a table or a feature class based on a query.

ITable OpenQueryClass(string Name, IQueryDescription QueryDescription)

Parameters

Name string
QueryDescription IQueryDescription

Returns

ITable

Remarks

If ID mapping was defined in the query description passed into this method, the returned query class will include a virtual column containing unique IDs. Aside from cases where conflicts will occur, this column is named "ESRI_OID".

OpenQueryCursor(string)

Returns a cursor based on a query.

ICursor OpenQueryCursor(string Query)

Parameters

Query string

Returns

ICursor

Remarks

A query cursor generally behaves like a non-recycling search cursor that returns read-only rows.