fx8i, fx9i, fx10g: Oracle Spatial

A database interface used to connect to an Oracle object-relational database. Note that Oracle database versions 8.1.x can store data in both a traditional relational format and the newer object-relational format. fx8i can only be used with the latter. See the section below to see how to access the relational Oracle model.

Connect String

An Oracle connect string, typically specified via a command line option, takes one of the following forms:

-c=<user_id>/<password>[@tns_name]

or

-c=<keyword>=<value>[,<keyword>=<value>]

where <keyword>=<uid>|<pwd>|<host>

<uid> = Oracle User ID
<pwd> = Oracle User password
<host> = Oracle database server TNS alias

To hide any sensitive connection information from prying eyes, an encoded string may be used. The utility fxencode is available for such encoding.

Extensions to Standard Commands

plsql

fx8i permits a single PL/SQL statement to be sent to the database. Oracle procedures and functions are supported. The syntax is:

plsql :<Fire_variable> = <PL/SQL_function>

plsql <PL/SQL_procedure>

The first statement shows how to call a PL/SQL function which by definition must return a value. The following return types are supported:

numeric
string
time (maps to an Oracle date type)

The following example illustrates how to call the Oracle sysdate function and retrieve the the return value into an EIM host variable:

time dt
*plsql :dt=sysdate()
tell dt

EIM host variables may also be passed as arguments to function and procedure calls. The arguments may be IN, OUT or IN/OUT as defined in the Oracle PL/SQL documentation. Note: No attempt is made to differentiate between these modes - all host variables are treated as potential IN/OUT arguments. It is the application programmer's responsibility to know which argument(s) may contain an OUT value upon return from the PL/SQL call. The maximum string length that can be returned in an OUT string type parameter is 1024 characters.

Below is an example of a procedure call where the second argument is known to be an OUT argument:

numeric arg1 = 10
string arg2
*plsql myPLSQLproc(:arg1,:arg2)
tell arg2

query_tables

query_tables <client_string_array>

Returns the names of all tables, excluding system tables, in the database. This list is also selectable by the following command:

iselect * from fxtables

Additional Commands

set_2d / set_3d

These commands, which do not take any parameters, are used to tell the interface whether incoming graphic entity values are to be recorded in the database with 2-D or 3-D co-ordinates, e.g. via the SQL INSERT command.

When the setting is 2-D, the default when the interface starts, Z ordinates are discarded, and points are entered into the database as 2-D only.

When the setting is 3-D, points are entered into the database in full 3-D.

The default setting may be changed by including the appropriate command in a startup script. This avoids the necessity of having to override the default at the start of every client session.