Retrieves a floating-point value from the internal result set, which is filled whenever a data generating SQL statement is executed (SELECT statement), no matter which database API (ORA, ODBC) has generated it.
db.bdh
RsGetFloat( in sIdentifier : string, in nIndex : number optional, out nResultCode : number optional ): float;
Parameter | Description |
---|---|
sIdentifier | Identifier of the result data column. |
nIndex | Array index for the column item (optional). |
nResultCode |
Variable receiving the result code of the operation (optional). It can be one of the following:
|
var hConnection : number; cCursor : cursor; dcltrans transaction TMain var sName : string; fBalance : float; begin OraLogon(hConnection, "user", "password", "orclnet2"); OraOpen(cCursor, hConnection); OraParse(cCursor, sqlSelect); OraBind(cCursor, ":1", SQLT_FLT); OraSetFloat(cCursor, ":1", 2000.0); OraDefine(cCursor, 1, SQLT_CHR, 32); OraDefine(cCursor, 2, SQLT_FLT); OraExec(cCursor); while OraFetch(cCursor) do sName := RsGetString("1"); fBalance := RsGetFloat("2"); write(sName, 32); write(fBalance); writeln; end; OraClose(cCursor); OraLogoff(hConnection); end TMain; dclsql sqlSelect: SELECT * FROM accounts WHERE balance > :1;