Type Library |
JAGAXWrapLib |
ProgID |
Jaguar.JagServerResults |
Provides methods to send rows to a EAServer client application.
BeginResults – Begins the sequence of calls that sends a result set to the client.
BindCol – Deprecated equivalent of BindColumn. The two methods are equivalent, except that the BindCol sourceBuf and indicator parameters are not explicitly declared as [in, out] in the type library.
BindColumn – Binds a program variable to a column in a result set.
ColAttributes – Specifies additional metadata for a column to be sent in a result set.
DescribeCol – Describes a result set column.
EndResults – Indicates that all rows in a result set have been sent.
ResultsPassthru – Deprecated equivalent of ResultSetsPassthrough. The methods are equivalent except that the ResultsPassthrough pInfo parameter is not explicitly declared [in, out] in the type library.
ResultSetsPassthrough – Forwards results from a remote database query to the client.
SendData – Sends one row in a result set.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Begins the sequence of calls that sends a result set to the client.
IJagServerResults.BeginResults(ByVal numColumns as Integer)
An integer that specifies the number of columns in the result set to be sent.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Deprecated equivalent of BindColumn. The two methods are equivalent, except that the BindCol sourceBuf and indicator parameters are not explicitly declared as [in, out] in the type library.
IJagServerResults.BindColumn( ByVal itemNumber As Integer, sourceBuf, ByVal maxBuflen As Integer, indicator As Integer)
See BindColumn.
See BindColumn.
See BindColumn.
See BindColumn.
BindCol is a deprecated equivalent of BindColumn. The two methods are equivalent, except that the BindCol sourceBuf and indicator parameters are not explicitly declared as [in, out] in the type library. You must use BindColumn in Visual Basic applications and with most other tools that use the ActiveX IDispatch interface.
Binds a program variable to a column in a result set.
IJagServerResults.BindColumn( ByVal itemNumber As Integer, sourceBuf, ByVal maxBuflen As Integer, indicator As Integer)
An integer specifying the column number. The first column is 1.
A variable to supply values for this column when row data is sent with the SendData method. The variable must be of a datatype that can be converted to the SQL datatype that was specified when DescribeCol was called for the column. “ActiveX to SQL datatype conversions” lists SQL datatypes and allowable bind types. You must use a different variable for each column, even if two columns have the same datatype.
For character and binary data, the maximum length that values for this column can have.
An integer passed by reference. Before calling the SendData method to send each row, set the indicator variable to indicate whether the column’s current value is null. You must use a different indicator variable for each column. Indicator values are as follows:
Value |
To indicate |
---|---|
0 |
Column value is not null and must be
read from the sourceBuf |
-1 |
Column value is null. |
BindCol associates a program variable with a column in a result set. When SendData is called to send a row, it reads the column value for the current row from the variable that is bound to the column.
The SQLDatatype value passed to DescribeCol determines the datatype with which column values are sent over the network. If the program variable type does not map directly to the column’s SQL datatype, SendData attempts to convert the value. The figure below shows the supported conversions between SQL datatypes and bind variable types. An X indicates a supported conversion.
ColAttributes, DescribeCol, SendData
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Specifies additional metadata for a column to be sent in a result set.
IJagServerResults.ColAttributes( ByVal itemNumnber as Integer, “COLUMN_MONEY”, ByVal trueFalse as Boolean )
An integer specifying the column number. The first column is 1.
A Boolean value. A value of True means that the column represents a cash value.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Describes a result set column.
IJagServerResults.DescribeCol( ByVal itemNumber as Integer, ByVal columnName as String, ByVal SQLDatatype as String, ByVal columnSize as Long, ByVal precision as Long, ByVal scale as Long, ByVal nullable as Boolean )
An integer specifying the column number. The first column is 1.
A string specifying the column’s name.
A string specifying the name of the column’s SQL datatype. This value determines the datatype of values sent to the client. Values are specified in a buffer that is bound to the column with BindColumn. The table below lists the SQL datatype strings. See BindColumn for details on how to bind column values.
SQL datatype string |
Description |
---|---|
“SQL_BIT” |
A boolean value (1 bit of data). |
“SQL_TINYINT” |
A one-byte integer. |
“SQL_SMALLINT” |
A two-byte integer. |
“SQL_INTEGER” |
A four-byte integer. |
“SQL_REAL” |
A four-byte IEEE floating point value. |
“SQL_FLOAT” |
An 8-byte IEEE floating point value. |
“SQL_DOUBLE” |
Same as “SQL_FLOAT” |
“SQL_NUMERIC” |
A fixed-point fractional number with precision and scale specified by parameters precision and scale. |
“SQL_DECIMAL” |
Same as “SQL_NUMERIC”. |
“SQL_CHAR” |
A string of a fixed length not greater than 255 characters. Values shorter than the length specified by columnSize are padded with spaces. |
“SQL_VARCHAR” |
A string of varying length, limited to 255 characters in length. |
“SQL_LONGVARCHAR” |
A string of varying length, with no length limit. |
“SQL_DATE” |
An ODBC date value. |
“SQL_TIME” |
An ODBC time value. |
“SQL_TIMESTAMP” |
An ODBC timestamp value. |
“SQL_BINARY” |
An array of bytes, whose values have a fixed length not greater than 255 characters. |
“SQL_VARBINARY” |
An array of bytes, whose values have varying length not greater than 255 characters. |
“SQL_LONGVARBINARY” |
An array of bytes, whose values have varying length with no length limit. |
For character or binary columns, a long integer that specifies the maximum length for column values.
A long integer that specifies the precision of column values. For “SQL_NUMERIC” or “SQL_DECIMAL” columns, precision indicates the maximum number of decimal digits that a value may have. For other datatypes, precision is ignored.
An integer that specifies the scale for column values. For “SQL_NUMERIC” or “SQL_DECIMAL” columns, scale indicates the number of decimal digits to the right of the decimal point. For other datatypes, scale is ignored.
A Boolean value that specifies whether the column can contain null values. True indicates that the column may have null values.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Indicates that all rows in a result set have been sent.
IJagServerResults.EndResults(ByVal rowCount as Long)
A positive long integer that specifies the number of rows that were sent to the client.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Deprecated equivalent of ResultSetsPassthrough. The methods are equivalent except that the ResultsPassthrough pInfo parameter is not explicitly declared [in, out] in the type library.
IJagServerResults.ResultsPassthrough( ByVal conlibName as String, ByVal conlibPtr, ByVal pthruType as String, pInfo as Long )
ResultsPassthrough is a deprecated equivalent of ResultSetsPassthrough. The methods are equivalent except that the ResultsPassthrough pInfo parameter is not explicitly declared [in, out] in the type library.
You must use ResultSetsPassthrough in Visual Basic and other tools that use the IDispatch interface.
Forwards results from a remote database query to the client.
IJagServerResults.ResultsPassthrough( ByVal conlibName as String, ByVal conlibPtr, ByVal pthruType as String, pInfo as Long )
A string with one of the following values:
“ODBC” to indicate that conlibPtr contains the address of an ODBC HSTMT control structure.
“CTLIB” to indicate that conlibPtr contains the address of a Client-Library CS_COMMAND control structure.
The “handle” for the connectivity library control structure used to retrieve results. When using ODBC, pass a handle to an HSTMT control structure as conlibPtr. The HSTMT must be in a state that allows SQLFetch to be called without error.
When using Client-Library, set conlibPtr to a Client-Library CS_COMMAND control structure. The CS_COMMAND must be in a state that allows ct_results to be called without error.
A string with one of the following values:
“CURRENT_RESULTS” to indicate that only the current result set should be forwarded to the client. When using this option, you must ensure that all result sets are processed. You can call ResultSetsPassthrough in a loop (see examples in “Comments” below). You can also retrieve or cancel subsequent result sets by directly calling ODBC or Client-Library routines.
“ALL_RESULTS” to indicate that all result sets should be forwarded to the client.
Pass as NULL if using ODBC or whenever using the “ALL_RESULTS” option to forward all results with one call.
When forwarding individual Client-Library result sets, you must pass an integer variable by reference as pInfo. ResultSetsPassthrough sets the pInfo variable to specify whether all results have been retrieved from the CS_COMMAND structure, as follows:
pInfo value |
To indicate |
---|---|
|
More results remain to be processed. |
|
All results have been processed. |
ResultSetsPassthrough forwards ODBC or Client-Library result sets to the client.
All results from a query can be forwarded with one call using the “ALL_RESULTS” option for the pthruType parameter. To forward single result sets, use the “CURRENT_RESULTS” option.
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Sends one row in a result set.
IJagServerResults.SendData();
SendData sends a row of data to the client. Values for each are read from the variables that were bound to the column with the BindColumn method.
BeginResults, DescribeCol, EndResults
Chapter 25, “Sending Result Sets,” in the EAServer Programmer’s Guide
Copyright © 2005. Sybase Inc. All rights reserved. |