Difference between revisions of "Remote Data Connectivity"

From Recital Documentation Wiki
Jump to: navigation, search
(Sending SQL Queries and Statements)
(Processing Result Sets)
Line 79: Line 79:
  
 
====Processing Result Sets====
 
====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
 +
* [[RDO_FETCH_ROW()|rdo_fetch_row()]] - return the next row from a result set as an object
 +
* [[RDO_FETCH_OBJECT()|rdo_fetch_object()]] - return the next row from a result set as an object
 +
 
* [[RDO_FETCH_FIELD()|rdo_fetch_field()]] - return an object containing information about a field from a result set
 
* [[RDO_FETCH_FIELD()|rdo_fetch_field()]] - return an object containing information about a field from a result set
 
* [[RDO_FETCH_LENGTHS()|rdo_fetch_lengths()]] - return the length of the contents of each field in a result set
 
* [[RDO_FETCH_LENGTHS()|rdo_fetch_lengths()]] - return the length of the contents of each field in a result set
* [[RDO_FETCH_OBJECT()|rdo_fetch_object()]] - return the next row from a result set as an object
+
* [[RDO_NUM_FIELDS()|rdo_num_fields()]] - return the number of fields in a result set
* [[RDO_FETCH_ROW()|rdo_fetch_row()]] - return the next row from a result set as an object
+
* [[RDO_NUM_ROWS()|rdo_num_rows()]] - return the number of rows in a result set
 +
 
 
* [[RDO_FIELD_FLAGS()|rdo_field_flags()]] - return the flags of a field in a result set
 
* [[RDO_FIELD_FLAGS()|rdo_field_flags()]] - return the flags of a field in a result set
 
* [[RDO_FIELD_LEN()|rdo_field_len()]] - return the length of a field in a result set
 
* [[RDO_FIELD_LEN()|rdo_field_len()]] - return the length of a field in a result set
 
* [[RDO_FIELD_NAME()|rdo_field_name()]] - return the name of a field in a result set
 
* [[RDO_FIELD_NAME()|rdo_field_name()]] - return the name of a field in a result set
* [[RDO_FIELD_SEEK()|rdo_field_seek()]] - jump to a specified field in a result set
 
* [[RDO_FIELD_TABLE()|rdo_field_table()]] - return the name of the table where a specified field is located
 
 
* [[RDO_FIELD_TYPE()|rdo_field_type()]] - return the type of a field in a result set
 
* [[RDO_FIELD_TYPE()|rdo_field_type()]] - return the type of a field in a result set
 +
* [[RDO_RESULT()|rdo_result()]] - return the value of a field in a result set
 +
* [[RDO_FIELD_TABLE()|rdo_field_table()]] - return the name of the table where a specified field is located
 +
 +
* [[RDO_DATA_SEEK()|rdo_data_seek()]] - move the internal row pointer
 +
* [[RDO_FIELD_SEEK()|rdo_field_seek()]] - jump to a specified field in a result set
 +
 +
 
* [[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====
 
====Getting Error Information====

Revision as of 14:41, 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

numeric = rdo_connect(servertype as character, hostname_or_ip as character, account as character, 
  password as character [, database as character])
numeric = rdo_select_db(database as character [, connection as numeric])

Disconnecting from a Data Source

numeric = rdo_close(connection as numeric)

Sending SQL Queries and Statements

numeric = rdo_exec(statement as string [, connection as numeric])
  • rdo_query() - return a result set object for a SELECT query
object = rdo_query(query as string [, connection as numeric])
object = rdo_unbuffered_query(query as string [, connection as numeric])
string = rdo_real_escape_string(query as string [, connection as numeric])
numeric = rdo_affected_rows()
  • rdo_info() - return information about the last query
string = rdo_info()

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

Examples

Using Recital Client/Server

Using Recital with MySQL

Using Recital with PostgreSQL

Using Recital with Oracle

Using Recital with DB2