Remote Data Connectivity
From Recital Documentation Wiki
Revision as of 14:00, 28 July 2010 by Yvonnemilne (Talk | contribs)
Contents
Remote Data Connectivity
Overview of Remote Data Connectivity Functions
- sqlcancel() - request that an executing SQL statement be cancelled
- sqlcolumns() - store column information to a cursor
- sqlcommit() - commit a transaction
- sqlconnect() - connect to a data source
- sqldisconnect() - disconnect from a data source
- sqlexec() - send an SQL statement to a data source
- sqlgetprop() - query property settings for a connection or the environment
- sqlmoreresult() - check if more results sets are available and if so, copy next results set to a cursor
- sqlprepare() - prepare an SQL statement that will be executed by the SQLEXEC() function
- sqlrollback() - rollback a transaction
- sqlsetprop() - set property settings for a connection
- sqlstringconnect() - connect to a data source using a gateway connection string
- sqltables() - store data source table names to a table
Overview of Recital Data Objects (RDO)
The RDO functions can be used for data access for both remote third-party/Recital and local Recital data sources. The functions allow a connection to be made to the data, SQL queries to be sent and the results to be loaded into a result set object for further processing.
Each MySQL compatible RDO function also has a MySQL-named equivalent for ease of use, e.g. rdo_connect() and mysql_connect() are synonyms.
Connecting to a Data Source
- rdo_connect() - connect to a data source
numeric = rdo_connect(servertype as character, hostname_or_ip as character, account as character, password as character [, database as character])
- rdo_select_db() - set the active database for a data source connection
rdo_select_db(database as character [, connection as numeric])
Disconnecting from a Data Source
- rdo_close() - close a data source opened with rdo_connect()
Sending SQL Queries and Statements
- rdo_exec() - execute a non-SELECT statement
- rdo_query() - return a result set object for a SELECT query
- rdo_unbuffered_query() - return a result set object for a SELECT query
- rdo_real_escape_string() - escape special characters in a string for use in an SQL statement
- rdo_affected_rows() - return the number of rows affected by the last operation
- rdo_info() - return information about the last query
Processing Result Sets
- rdo_data_seek() - move the internal row pointer
- rdo_fetch_array() - return the results of a query as an associative array
- rdo_fetch_assoc() - return the results of a query as an associative array
- rdo_fetch_field() - return an object containing information about a field from a result set
- rdo_fetch_lengths() - return the length of the contents of each field in a result set
- rdo_fetch_object() - return the next row from a result set as an object
- rdo_fetch_row() - return the next row from a result set as an object
- rdo_field_flags() - return the flags of a field in a result set
- rdo_field_len() - return the length of a field in a result set
- rdo_field_name() - return the name of a field in a result set
- rdo_field_seek() - jump to a specified field in a result set
- rdo_field_table() - return the name of the table where a specified field is located
- rdo_field_type() - return the type of a field in a result set
- rdo_free_object() - free memory used by a result set object
- rdo_free_result() - free memory used by a result set object
- rdo_num_fields() - return the number of fields in a result set
- rdo_num_rows() - return the number of rows in a result set
- rdo_result() - return the value of a field in a result set
Getting Error Information
- rdo_errno() - return the number of the last error
- rdo_error() - return the error description of the last Recital error
Getting Environment Information
- rdo_get_client_info() - return information about the client
- rdo_get_host_info() - return information about the connection
- rdo_list_dbs() - list the available databases for the current or specified connection
- rdo_ping() - check whether a server connection is active
- rdo_stat() - return the current system status of Recital
- rdo_thread_id() - return the current thread ID