Login Register
The SET RELATION Recital Navigational Data Command can be used to link two (or more) tables based on the master index key of the child table.  With a relation active, as you move through the parent table, the record pointer also moves in the child table, automatically selecting the first related record or moving to the end of file if no related record exists.    

open database southwind
// open child table
use order_details order orderid in 0
// open parent table
use orders order orderid in 0
set relation to orderid into order_details
do while not eof()
? orders.orderid, order_details.productid

The code above will display the productid from the first related record, but you will often want to display information from all the related records in the child or detail table as in an SQL Left Outer Join.

open database southwind
select orders.orderid, order_details.productid;
from orders left outer join order_details;
on orders.orderid = order_details.orderid

In this case, we can use a second nested DO WHILE loop, for example:

open database southwind
use order_details order orderid in 0
use orders order orderid in 0
set relation to orderid into order_details
do while not eof()
// Display first or 0 child record
? orders.orderid, order_details.productid
// Display any additional child records
do while not eof(order_details)
? orders.orderid, order_details.productid
skip in order_details

Or we can use the SET SKIP command.  The SET SKIP command can be used with DISPLAY, LIST and REPORT and automatically skips through all the related records in the child table.

open database southwind
use order_details order orderid in 0
use orders order orderid in 0
set relation to orderid into order_details
set skip on
set skip to order_details
list orders.orderid, order_details.productid

LIST and DISPLAY offer a number of keyword options to allow you to configure the display output.  REPORT offers full column based report design.
Published in Blogs
Each Recital table can have one or more data dictionaries to provide a central repository for constraints and other metadata. 

Here's how to set up field validation for a field with a small static number of acceptable values.

Using the example.dbf table from the southwind sample database, validation can be added to the title field to ensure it matches one of a list values.
open database southwind
alter table example add constraint;
(title set check inlist(alltrim(title),"Miss","Mr","Mrs","Ms"))
The inlist() function checks whether the specified expression exists in the comma-separated list which follows.  An attempt to update title with a value not in the list will give an error: Validation on field 'TITLE' failed.

If you have access to the Recital Workbench, you can use the modify structure worksurface to add and alter your dictionary entries, including a customized error message if required.


Published in Blogs
Recital Web: cookies, sessions, 64-bit Apache module: documentation update:

Recital Web Getting Started
Published in Blogs

When stress testing our loadbalancer, i was unable to get more than 20 reliable ssh connections. The following error would be reported.

ssh_exchange_identification: Connection closed by remote host

The resolution for this is quite simple.

Edit the /etc/ssh/sshd_config file and increase the MaxStartups. On my server i set this to 200.

Edit /etc/sysctrl.conf and add the following line:

net.core.netdev_max_backlog = 3000

Then apply this change:

# sysctl -p


Published in Blogs
This link provides a decent covering of this topic.
Published in Blogs

Yes, your FoxPlus and FoxPRO applications should run under Recital with little to no changes at all. We provide expert product support if you have any questions or problems. If you lack the resources to move your applications into Recital we can provide that service to you also if required.
Published in Blogs

In this article Barry Mavin, CEO and Chief Software Architect for Recital provides details on how to use the Recital Universal .NET Data Provider with the Recital Database Server.


A data provider in the .NET Framework serves as a bridge between an application and a data source. A data provider is used to retrieve data from a data source and to reconcile changes to that data back to the data source.

Each .NET Framework data provider has a DataAdapter object: the .NET Framework Data Provider for OLE DB is the OleDbDataAdapter object, the .NET Framework Data Provider for SQL Server is the SqlDataAdapter object, the .NET Framework Data Provider for ODBC is the OdbcDataAdapter object, and the .NET Framework Data Provider for the Recital Database Server is the RecitalDataAdapter object.

The Recital Universal .NET Data Provider can access any data sources supported by the Recital Database Server. It is not restricted to only access Recital data. It can be used to access server-side ODBC, JDBC and OLE DB data sources also.

Core classes of the Data Provider

The Connection, Command, DataReader, and DataAdapter objects represent the core elements of the .NET Framework data provider model. The Recital Universal .NET Data Provider is plug compatible with the .NET Framework Data Provider for SQL Server. All SQL Server classes are prefixed with "Sql" e.g. SqlDataAdaptor. To use the Recital Universal Data Adaptor, simply change the "Sql" prefix to "Recital" e.g. RecitalDataAdaptor.

The following table describes these objects.

Object Description
RecitalConnection Establishes a connection to a specific data source.
RecitalCommand Executes a command against a data source.
RecitalDataReader Reads a forward-only, read-only stream of data from a data source.
RecitalDataAdapter Populates a DataSet and resolves updates with the data source.

Along with the core classes listed in the preceding table, a .NET Framework data provider also contains the classes listed in the following table.

Object Description
RecitalTransaction Enables you to enlist commands in transactions at the data source.
RecitalCommandBuilder A helper object that will automatically generate command properties of a DataAdapter or will derive parameter information from a stored procedure and populate the Parameters collection of a Command object.
RecitalParameter Defines input, output, and return value parameters for commands and stored procedures.

The Recital Universal .NET Data Provider provides connectivity to the Recital Database Server running on any supported platform (Windows, Linux, Unix, OpenVMS) using the RecitalConnection object. The Recital Universal .NET Data Provider supports a connection string format that is similar to the SQL Server connection string format.

The basic format of a connection string consists of a series of keyword/value pairs separated by semicolons. The equal sign (=) connects each keyword and its value.

The following table lists the valid names for keyword values within the ConnectionString property of the RecitalConnection class.

Name Default Description
Data Source
  The name or network address of the instance of the Recital Database Server which to connect to.
Directory   The target directory on the remote server where data to be accessed resides. This is ignored when a Database is specified.
false When true, DES3 encryption is used for all data sent between the client and server.
Initial Catalog
  The name of the database on the remote server.
-or- Pwd
  The password used to authenticate access to the remote server.
User ID
  The user name used to authenticate access to the remote server.
Connection Pooling
false Enable connection pooling to the server. This provides for one connection to be shared.
Logging false Provides for the ability to log all server requests for debugging purposes
Rowid true When Rowid is true (the default) a column will be post-fixed to each SELECT query that is a unique row identifier. This is used to provide optimised UPDATE and DELETE operations. If you use the RecitalSqlGrid, RecitalSqlForm, or RecitalSqlGridForm components then this column is not visible but is used to handle updates to the underlying data source.
Logfile   The name of the logfile for logging

Opens an SQL gateway(Connection) to a foreign SQL data source on the remote server.
Using Gateways, you can transparently access the following local or remote data sources:

  • Recital
  • Oracle
  • ODBC (Server-side ODBC data sources)
  • JDBC (Server-side JDBC data sources)
  • ADO (Use this to connect to SQL Server and other Native Windows OLEDB data sources)
  • MySQL
  • PostgreSQL

The gateway can be specified in several formats:

Populating a DataSet from a DataAdaptor

The ADO.NET DataSet is a memory-resident representation of data that provides a consistent relational programming model independent of the data source. The DataSet represents a complete set of data including tables, constraints, and relationships among the tables. Because the DataSet is independent of the data source, a DataSet can include data local to the application, as well as data from multiple data sources. Interaction with existing data sources is controlled through the DataAdapter.

A DataAdapter is used to retrieve data from a data source and populate tables within a DataSet. The DataAdapter also resolves changes made to the DataSet back to the data source. The DataAdapter uses the Connection object of the .NET Framework data provider to connect to a data source and Command objects to retrieve data from and resolve changes to the data source.

The SelectCommand property of the DataAdapter is a Command object that retrieves data from the data source. The InsertCommand, UpdateCommand, and DeleteCommand properties of the DataAdapter are Command objects that manage updates to the data in the data source according to modifications made to the data in the DataSet.

The Fill method of the DataAdapter is used to populate a DataSet with the results of the SelectCommand of the DataAdapter. Fill takes as its arguments a DataSet to be populated, and a DataTable object, or the name of the DataTable to be filled with the rows returned from the SelectCommand.

The Fill method uses the DataReader object implicitly to return the column names and types used to create the tables in the DataSet, as well as the data to populate the rows of the tables in the DataSet. Tables and columns are only created if they do not already exist; otherwise Fill uses the existing DataSet schema.

Examples in C#:
// include the references below
using System.Data;
using Recital.Data;

// The following code example creates an instance of a DataAdapter that 
// uses a Connection to the Recital Database Server Southwind database 
// and populates a DataTable in a DataSet with the list of customers. 
// The SQL statement and Connection arguments passed to the DataAdapter 
// constructor are used to create the SelectCommand property of the DataAdapter.
public DataSet SelectCustomers()
	RecitalConnection swindConn = new
		RecitalConnection("Data Source=localhost;Initial Catalog=southwind");
	RecitalCommand selectCMD = new
		RecitalCommand("SELECT CustomerID, CompanyName FROM Customers", swindConn);
	selectCMD.CommandTimeout = 30;
	RecitalDataAdapter custDA = new RecitalDataAdapter();
	custDA.SelectCommand = selectCMD;
	DataSet custDS = new DataSet();
	custDA.Fill(custDS, "Customers");
	return custDS;

// The following example uses the RecitalCommand, RecitalDataAdapter and 
// RecitalConnection, to select records from a database, and populate a 
// DataSet with the selected rows. The filled DataSet is then returned. 
// To accomplish this, the method is passed an initialized DataSet, a 
// connection string, and a query string that is a SQL SELECT statement
public DataSet SelectRecitalRows(DataSet dataset, string connection, string query) 
	RecitalConnection conn = new RecitalConnection(connection);
	SqlDataAdapter adapter = new RecitalDataAdapter();
	adapter.SelectCommand = new RecitalCommand(query, conn);
	return dataset;
Published in Blogs
Recital 10 enhances the way updating tables with indexes is done. The Recital engine will now evaluate each index individually to determine if any changes being made to the row effect it. If this is not the case then the index is flagged not to be updated. This enhancement helps speed up performance of updates and is particularly noticeable in cluster/network installations.
Published in Blogs





The MQCURMSGS() function returns the current number of unread messages in the queue specified by <expN>


if (mqdes < 0)
do while (mqcurmsgs(mqdes) > 0)
   if (empty(mstr))
end do

Published in Blogs

A quick tip for optimizing TCP performance on linux.

edit /etc/sysctl.conf add the lines:

If using gigabit ethernet:

net.ipv4.tcp_mem= 98304 131072 196608
net.core.wmem_default = 65536
net.core.rmem_default = 65536

To reload these use:

# sysctl -p

If using infiniband:

net.ipv4.tcp_rmem=10000000 10000000 10000000
net.ipv4.tcp_wmem=10000000 10000000 10000000
net.ipv4.tcp_mem=10000000 10000000 10000000

Published in Blogs

Copyright © 2021 Recital Software Inc.



User Registration
or Cancel