Difference between revisions of "Remote Data Connectivity"

From Recital Documentation Wiki
Jump to: navigation, search
(Freeing Memory)
(Getting Environment Information)
Line 118: Line 118:
 
====Getting Environment Information====
 
====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
 +
 +
<pre>
 +
string = rdo_get_client_info()
 +
</pre>
 +
 
* [[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
 +
 +
<pre>
 +
string = rdo_get_host_info(connection as numeric)
 +
</pre>
 +
 
* [[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_PING()|rdo_ping()]] - check whether a server connection is active
 
* [[RDO_PING()|rdo_ping()]] - check whether a server connection is active

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

Freeing Memory
numeric = rdo_free_object(resultset as object)
numeric = rdo_free_result(resultset as object)

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

string = rdo_get_client_info()
string = rdo_get_host_info(connection as numeric)
  • 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

Examples

Using Recital Client/Server

Using Recital with MySQL

Using Recital with PostgreSQL

Using Recital with Oracle

Using Recital with DB2