Skip to main content


class %XDBC.Gateway.ODBC.ResultSet extends %XDBC.Gateway.ResultSet

Property Inventory

Method Inventory


property atEnd as %Integer;
Property methods: atEndDisplayToLogical(), atEndGet(), atEndIsValid(), atEndLogicalToDisplay(), atEndNormalize(), atEndSet()
property metadata as %XDBC.Gateway.ResultSetMetaData;
Property methods: metadataGet(), metadataGetSwizzled(), metadataIsValid(), metadataNewObject(), metadataSet()
property statement as %XDBC.Gateway.ODBC.Statement;
Property methods: statementGet(), statementGetSwizzled(), statementIsValid(), statementNewObject(), statementSet()


method %Display(pDelimiter As %String = $Char(9), colAlign As %Integer = 0)
Formated dispaly all data
method %Get(colName As %String) as %Boolean
method %GetData(colindex As %String) as %Boolean
method %Next() as %Boolean
method %OnNew(st As %XDBC.Gateway.ODBC.Statement) as %Status
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method %Print(pDelimiter As %String = " ", colAlign As %Integer = 0, ByRef metadata As %ArrayOfObjects) as %Status

Write the current row to the current device. An optional column delimiter can be specified. No formatting is applied other than writing pDelimiter between column values. This can be useful for exporting result set data to tab delimited files.

For example:

   set sql = "select name,home_street,home_city,home_state,home_zip from sample.person"
   set rset = ##class(%ResultSet.SQL).%Prepare(.sql,.err,"")
   if '$Isobject(err) {
   	set file="c:\temp\names.asv"
   	open file:"WNS"
   	use file while rset.%Next() { do rset.%Print($char(9)) } 
   	close file

Example data:

Cornell,Ezra M.340 Franklin CourtSarasotaNY12866
Huff,Stephen A.548 Washington BlvdBrownfield CenterMD53436
Sands,Jeep Q.7298 Washington DriveXavierWY23685
method Close() as %Status
method Display(pDelimiter As %String = " ") as %Status
Display all rows
method Get(colname As %RawString = "") as %Library.RawString
Returns the value of the column with the name colname in the current row of the result set.

If colname is not a valid column name, this method throws a error.

method GetData(colindex As %Integer) as %Library.RawString
method GetFetchSize() as %Integer
method GetMetaData() as %XDBC.Gateway.ResultSetMetaData
Return the result set metadata as a %SQL.StatementMetadata instance.
method GetObject(columnIndex As %Integer) as %ObjectHandle
Method Not Supported
method GetRow() as %Library.List
Advance to the next row in the result set. Returns 0 if the cursor is at the end of the result set. The row is returned in $List format by reference in the Row argument.
method GetRows(rowCount As %Library.Integer) as %Library.Integer
Method Not Supported
Advance to the next row in the result set. Returns 0 if the cursor is at the end of the result set.
method SetFetchSize(rows As %Integer)
method WasNull() as %Boolean
Method Not Supported

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab