Configuring Recordsets SECTION 12 Databases
188
This will bring up a dialog box with a list of all valid files in the 'Directory'
specified for the Connection. After choosing a file and exiting from the 'Build
SQL' dialog box the required SQL Text is built. In the above example, the file
'Tables.txt' was chosen, but this will be written as Tables#txt in the SQL Text as
most Providers do not accept the '.' character, because it is used as a
delimiter.
12-3-3 Source
The source field shows the Table name, Server Query or SQL text as selected
above which the Recordset is linked to.
12-3-3-1 Automatically open on connection
If this checkbox is ticked the Recordset will be automatically opened when the
Connection is opened. If this is unchecked, the Recordset must be open with a
script command.
12-3-4 Lock
The lock option enables the Recordset to be opened in either read only or
read/write modes, there are two type of read/write locks as defined below:
Read OnlyThe default lock is read only i.e. data cannot be changed.
Server Query The Recordset is the results of a pre-defined Server
Query stored in the database.
SQL Text The Recordset is the results of an SQL query executed
when the Recordset is opened.
Note: It is more efficient to run a Server Query than an SQL query.
Note: For Database connections all three of the above options are available, but for
Text or CSV connections only one option is available, namely 'SQL Text'. For
convenience, a facility is provided for automatically building the required SQL
Text for this type of connection. This facility is invoked from the 'Build SQL…'
button shown below:
Read Only The default lock is read only i.e. data cannot be changed.
Pessimistic Locks records when you start editing and releases the lock
when Update() (or Cancel()) is called, no need to worry about a
conflict with other users, but can cause records to be locked for
long periods of time preventing other users from accessing the
same records.