Difference between revisions of "Remote Data Connectivity"

From Recital Documentation Wiki
Jump to: navigation, search
(Overview of Recital Data Objects (RDO))
(Overview of Recital Data Objects (RDO))
Line 20: Line 20:
 
Each MySQL compatible RDO function also has a MySQL-named equivalent for ease of use, e.g. [[RDO_CONNECT()|rdo_connect()]] and [[RDO_CONNECT()|mysql_connect()]] are synonyms.
 
Each MySQL compatible RDO function also has a MySQL-named equivalent for ease of use, e.g. [[RDO_CONNECT()|rdo_connect()]] and [[RDO_CONNECT()|mysql_connect()]] are synonyms.
  
 +
====Connecting to a Data Source====
 +
* [[RDO_CONNECT()|rdo_connect()]] - connect to a data source
 +
* [[RDO_SELECT_DB()|rdo_select_db()]] - set the active database for a data source connection
  
* [[RDO_AFFECTED_ROWS()|rdo_affected_rows()]] - return the number of rows affected by the last operation
+
====Disconnecting from a Data Source====
 
* [[RDO_CLOSE()|rdo_close()]] - close a data source opened with [[RDO_CONNECT()|rdo_connect()]]
 
* [[RDO_CLOSE()|rdo_close()]] - close a data source opened with [[RDO_CONNECT()|rdo_connect()]]
* [[RDO_CONNECT()|rdo_connect()]] - connect to a data source
+
 
* [[RDO_DATA_SEEK()|rdo_data_seek()]] - move the internal row pointer
+
====Sending SQL Queries and Statements====
* [[RDO_ERRNO()|rdo_errno()]] - return the number of the last error
+
* [[RDO_ERROR()|rdo_error()]] - return the error description of the last Recital error
+
 
* [[RDO_EXEC()|rdo_exec()]] - execute a non-SELECT statement
 
* [[RDO_EXEC()|rdo_exec()]] - execute a non-SELECT statement
 +
* [[RDO_QUERY()|rdo_query()]] - return a result set object for a SELECT query
 +
* [[RDO_UNBUFFERED_QUERY()|rdo_unbuffered_query()]] - return a result set object for a SELECT query
 +
* [[RDO_REAL_ESCAPE_STRING()|rdo_real_escape_string()]] - escape special characters in a string for use in an SQL statement
 +
* [[RDO_AFFECTED_ROWS()|rdo_affected_rows()]] - return the number of rows affected by the last operation
 +
* [[RDO_INFO()|rdo_info()]] - return information about the last query
 +
 +
====Processing Result Sets====
 +
* [[RDO_DATA_SEEK()|rdo_data_seek()]] - move the internal row pointer
 
* [[RDO_FETCH_ARRAY()|rdo_fetch_array()]] - return the results of a query as an associative array
 
* [[RDO_FETCH_ARRAY()|rdo_fetch_array()]] - return the results of a query as an associative array
 
* [[RDO_FETCH_ASSOC()|rdo_fetch_assoc()]] - return the results of a query as an associative array
 
* [[RDO_FETCH_ASSOC()|rdo_fetch_assoc()]] - return the results of a query as an associative array
Line 42: Line 51:
 
* [[RDO_FREE_OBJECT()|rdo_free_object()]] - free memory used by a result set object
 
* [[RDO_FREE_OBJECT()|rdo_free_object()]] - free memory used by a result set object
 
* [[RDO_FREE_RESULT()|rdo_free_result()]] - free memory used by a result set object
 
* [[RDO_FREE_RESULT()|rdo_free_result()]] - free memory used by a result set object
 +
* [[RDO_NUM_FIELDS()|rdo_num_fields()]] - return the number of fields in a result set
 +
* [[RDO_NUM_ROWS()|rdo_num_rows()]] - return the number of rows in a result set
 +
* [[RDO_RESULT()|rdo_result()]] - return the value of a field in a result set
 +
 +
====Getting Error Information====
 +
* [[RDO_ERRNO()|rdo_errno()]] - return the number of the last error
 +
* [[RDO_ERROR()|rdo_error()]] - return the error description of the last Recital error
 +
 +
====Getting Environment Information====
 
* [[RDO_GET_CLIENT_INFO()|rdo_get_client_info()]] - return information about the client
 
* [[RDO_GET_CLIENT_INFO()|rdo_get_client_info()]] - return information about the client
 
* [[RDO_GET_HOST_INFO()|rdo_get_host_info()]] - return information about the connection
 
* [[RDO_GET_HOST_INFO()|rdo_get_host_info()]] - return information about the connection
* [[RDO_INFO()|rdo_info()]] - return information about the last query
 
 
* [[RDO_LIST_DBS()|rdo_list_dbs()]] - list the available databases for the current or specified connection
 
* [[RDO_LIST_DBS()|rdo_list_dbs()]] - list the available databases for the current or specified connection
* [[RDO_NUM_FIELDS()|rdo_num_fields()]] - return the number of fields in a result set
 
* [[RDO_NUM_ROWS()|rdo_num_rows()]] - return the number of rows in a result set
 
 
* [[RDO_PING()|rdo_ping()]] - check whether a server connection is active
 
* [[RDO_PING()|rdo_ping()]] - check whether a server connection is active
* [[RDO_QUERY()|rdo_query()]] - return a result set object for a SELECT query
 
* [[RDO_REAL_ESCAPE_STRING()|rdo_real_escape_string()]] - escape special characters in a string for use in an SQL statement
 
* [[RDO_RESULT()|rdo_result()]] - return the value of a field in a result set
 
* [[RDO_SELECT_DB()|rdo_select_db()]] - set the active database for a data source connection
 
 
* [[RDO_STAT()|rdo_stat()]] - return the current system status of Recital
 
* [[RDO_STAT()|rdo_stat()]] - return the current system status of Recital
 
* [[RDO_THREAD_ID()|rdo_thread_id()]] - return the current thread ID
 
* [[RDO_THREAD_ID()|rdo_thread_id()]] - return the current thread ID
* [[RDO_UNBUFFERED_QUERY()|rdo_unbuffered_query()]] - return a result set object for a SELECT query
 
  
 
===Using Recital Client/Server ===
 
===Using Recital Client/Server ===

Revision as of 13:42, 28 July 2010

Remote Data Connectivity

Overview of Remote Data Connectivity Functions

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

Disconnecting from a Data Source

Sending SQL Queries and Statements

Processing Result Sets

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

Using Recital Client/Server

Using Recital with MySQL

Using Recital with PostgreSQL

Using Recital with Oracle

Using Recital with DB2