Xbasic

SQL::ResultSetDataAsGeography Method

Syntax

result as p = DataAsGeography(Column as N [,SRID as N])

result as p = DataAsGeography(Column as C [,SRID as N])

Arguments

ColumnNumeric Character

The column index or column name.

SRIDNumeric

 

Returns

resultPointer

Returns a .NET Geography object (Microsoft.SQLTypes.SQLGeography) populated with the data from the database.

Description

Takes data retrieved from a database and returns a .NET Geography object.

Discussion 

Get the data for the column name or index specified as a Geography object. SQL::ResultSet::DataAsGeography(), will return a .NET Geography object (Microsoft.SQLTypes.SQLGeography) instantiated from the data retrieved from your database. The object is instantiated regardless of the database from which the data was retrieved.

This function works with GeogAsText() and GeogAsBinary(). For PostgreSQL, MySQL and SQL Server you can select the column directly without using the portable SQL function. In some cases, the database does not return enough information to instantiate the object properly unless you wrap the column with either GeogAsText() or GeogAsBinary().