This page is maintained for older versions of Rapise only. The latest documentation can be found at: https://rapisedoc.inflectra.com
Database

Database

Top  Previous  Next

 

Database object. Use it to read and write ADO data sources.

 

 

Action Summary

 

Action

Description

DoAttach

Attaches to a Database with given ADO connection string and SQL query.

DoMoveToRow

Moves to a given row.

DoRandom

Selects random row and column in the recordset.

DoSequential

Advances to the next row in the table.

GetColumnCount

Gets columns count.

GetColumnName

Gets column name.

GetColumnNames

Gets column names.

GetCurrentRowIndex

Get zero based current row index.

GetRowCount

Gets rows count.

GetValue

Gets value by column name, and, optionally, row number.

 

Action Detail

 

DoAttach(connection_string, sql)

Attaches to a Database with given ADO connection string and SQL query.

 

Parameters:

 

Name

Type

Description

connection_string

String

ADO connection string.

sql


SQL Query (i.e. 'select * from Customers')
Optional.

 

Returns:

 

true, if successfull

 

DoMoveToRow(rowInd)

Moves to a given row.

 

Parameters:

 

Name

Type

Description

rowInd

Number

Row index to set active.

 

DoRandom()

Selects random row and column in the recordset.

 

Returns:

 

'false' if the the DB is is not connected, 'true' - otherwise.

 

DoSequential()

Advances to the next row in the table. When the end of the range is reached DoSequential returns 'false'.

 

Returns:

 

'false' if being called when active row is the last row or the recordset is not attached, 'true' - otherwise.

 

GetColumnCount()

Gets columns count.

 

Returns:

 

Number of Columns in the result set.

 

GetColumnName(ind)

Gets column name.

 

Parameters:

 

Name

Type

Description

ind

Number

Column index.

 

Returns:

 

Name of column in the spreadsheet.

 

GetColumnNames()

Gets column names.

 

Returns:

 

Array of column names in the table.

 

GetCurrentRowIndex()

Get zero based current row index.

 

GetRowCount()

Gets rows count.

 

Returns:

 

Number of rows in the result set.

 

GetValue(columnId, rowId)

Gets value by column name, and, optionally, row number. Returns current cell value after DoSequental or DoRandom if params not set.

 

Parameters:

 

Name

Type

Description

columnId

Number |
String

Column index or name. If not set 1st column is used.
Optional.

rowId

Number

Row index. If not set current row is used.
Optional.