Chapter 3 ActiveX IDispatch Interface Reference
Type Library |
JAGAXWrapLib |
Progid |
Jaguar.JagServerResults |
Provides methods to send rows to a Jaguar client application.
Chapter 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Begin the sequence of calls that sends a result set to the client.
IJagServerResults.BeginResults(ByVal numColumns as Integer)
numColumns
An integer that specifies the number of columns in the result set to be sent.
Chapter 12, "Sending Result Sets" in the Jaguar CTS 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)
itemNumber
See BindColumn.
sourceBuf
See BindColumn.
maxBufLen
See BindColumn.
indicator
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.
Bind a program variable to a column in a result set.
IJagServerResults.BindColumn(
ByVal itemNumber As Integer,
sourceBuf,
ByVal maxBuflen As Integer,
indicator As Integer)
itemNumber
An integer specifying the column number. The first column is 1.
sourceBuf
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.
maxBufLen
For character and binary data, the maximum length that values for this column can have.
indicator
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 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Specify additional metadata for a column to be sent in a result set.
IJagServerResults.ColAttributes(
ByVal itemNumnber as Integer,
"COLUMN_MONEY",
ByVal trueFalse as Boolean
)
itemNumber
An integer specifying the column number. The first column is 1.
thrueFalse
A Boolean value. A value of True means that the column represents a cash value.
Chapter 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Describe 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
)
itemNumber
An integer specifying the column number. The first column is 1.
columnName
A string specifying the column's name.
SQLDatatype
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.
columnSize
For character or binary columns, a long integer that specifies the maximum length for column values.
precision
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.
scale
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.
nullable
A Boolean value that specifies whether the column can contain null values. True indicates that the column may have null values.
Chapter 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Indicate that all rows in a result set have been sent.
IJagServerResults.EndResults(ByVal rowCount as Long)
rowCount
A positive long integer that specifies the number of rows that were sent to the client.
Chapter 12, "Sending Result Sets" in the Jaguar CTS 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
)
conlibName
conlibPtr
pthruType
pInfo
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.
Forward results from a remote database query to the client.
IJagServerResults.ResultsPassthrough(
ByVal conlibName as String,
ByVal conlibPtr,
ByVal pthruType as String,
pInfo as Long
)
conlibName
A string with one of the following values:
conlibPtr
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.
pthruType
A string with one of the following values:
pInfo
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 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Send 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 12, "Sending Result Sets" in the Jaguar CTS Programmer's Guide
Copyright © 2000 Sybase, Inc. All rights reserved. |
![]() |