Recital

Login Register

We are pleased to announce the release of Recital 10.0.3.

Here is a brief list of features and functionality that you will find in the 10.0.3 release.

  • New Commands:
    - SET TMPNAMPATH ON|OFF
    - REMOVE TABLE
  • New Functions:
    - CURSORGETPROP()
    - CURSORSETPROP()
    - CURVAL()
    - GETFLDSTATE()
    - OLDVAL()
    - TABLEREVERT()
    - TABLEUPDATE()
    - SETFLDSTATE()
  • Enhanced Functions:
    - TMPNAM() - additional parameter to specify the return of basename only
    - MAILATTACH() - parameter changed from array to filename to allow directory and file extension to be specified
  • Enhancements:
    - DO level increased from 32 to 64.
  • Fixes:
    - Delay exiting Recital after SYS(3) or SYS(2015)
    - SET SOFTSEEK issue when search key above first record in index
    - Compilation error with REPLACE command after UDF call
    - FETCH INTO memvars error
    - END TRANSACTION at command prompt error
    - ROLLBACK locking error
    - Linux ODBC Driver undefined symbol error
    - RELEASE variable with same name as variable in calling program issue
    - SQLCODE() issue on non-gateway data access
    - Issuing two SQLEXEC() calls error
    - LASTSEQNO() in workareas > 1 error
    - SET RELATION to detail table in workarea 1 issue
    - LIST STATUS on empty table delay
    - SET AUTOCATALOG alias entries error
    - ADD OBJECT in DEFINE CLASS error
    - DEACTIVATE WINDOW error
    - SORT error
    - Other reported bugs
Published in Blogs
Read more...

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.

Overview

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
-or-
Server
-or-
Servername
-or-
Nodename
  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.
Encrypt
-or-
Encryption
false When true, DES3 encryption is used for all data sent between the client and server.
Initial Catalog
-or-
Database
  The name of the database on the remote server.
Password
-or- Pwd
  The password used to authenticate access to the remote server.
User ID
-or-
uid
-or-
User
-or-
Username
  The user name used to authenticate access to the remote server.
Connection Pooling
-or-
Pool
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
Gateway  

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:
servertype@nodename:username/password-database
e.g.
oracle@nodename:username/password-database
mysql@nodename:username/password-database
postgresql@nodename:username/password-database
-or-
odbc:odbc_data_source_name_on_server
oledb:oledb_connection_string_on_server
jdbc:jdbc_driver_path_on_server;jdbc:Recital:args


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;
	swindConn.Open();
	DataSet custDS = new DataSet();
	custDA.Fill(custDS, "Customers");
	swindConn.Close();
	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);
	adapter.Fill(dataset);
	return dataset;
}
Published in Blogs
Read more...

In this article Barry Mavin, CEO and Chief Software Architect for Recital, details on how to use the Client Drivers provided with the Recital Database Server to work with local or remote server-side JDBC data sources.

Overview

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 JDBC Driver provides the same functionality for java applications.

The Recital Universal ODBC Driver provides the same functionality for applications that use ODBC.

Each of the above Client Drivers use a connection string to describe connections parameters.

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

The following table lists the valid names for keyword/values.


Name Default Description

Data Source
-or-
Server
-or-Nodename

  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.

Encrypt
-or-
Encryption

false When true, DES3 encryption is used for all data sent between the client and server.
Initial Catalog
-or-
Database
  The name of the database on the remote server.
Password
-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
-or-
Pool

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
Gateway  

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:
servertype@nodename:username/password-database
e.g.
oracle@nodename:username/password-database
mysql@nodename:username/password-database
postgresql@nodename:username/password-database
-or-
odbc:odbc_data_source_name_on_server
oledb:oledb_connection_string_on_server
jdbc:jdbc_driver_path_on_server;jdbc:Recital:args

To connect to a server-side JDBC data source, you ue the gateway=value key/value pair in the following way.

gateway=jdbc:jdbc_driver_path_on_server;jdbc:Recital:args

You can find examples of connection strings for most ODBC and OLE DB data sources by clicking here.

Example in C# using the Recital Universal .NET Data Provider:
////////////////////////////////////////////////////////////////////////
// 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, and a gateway to
// Recital Southwind database. It then populates a DataTable 
// in a DataSet with the list of customers via the JDBC driver. 
// The SQL statement and Connection arguments passed to the DataAdapter 
// constructor are used to create the SelectCommand property of the
// DataAdapter.
public DataSet SelectCustomers()
{
	string gateway = "jdbc:/usr/java/lib/RecitalJDBC/Recital/sql/RecitalDriver;"+
			"jdbc:Recital:Data Source=localhost;database=southwind";       
	RecitalConnection swindConn = new
			RecitalConnection("Data Source=localhost;gateway=\""+gateway+"\");
	RecitalCommand selectCMD = new
			RecitalCommand("SELECT CustomerID, CompanyName FROM Customers", swindConn);
	selectCMD.CommandTimeout = 30;
	RecitalDataAdapter custDA = new RecitalDataAdapter();    
	custDA.SelectCommand = selectCMD;    
	swindConn.Open();    
	DataSet custDS = new DataSet();
	custDA.Fill(custDS, "Customers");    
	swindConn.Close();
	return custDS;
}
Example in Java using the Recital Universal JDBC Driver:
////////////////////////////////////////////////////////////////////////
// standard imports required by the JDBC driver
import java.sql.*;
import java.io.*;
import java.net.URL;
import java.math.BigDecimal;
import Recital.sql.*;

////////////////////////////////////////////////////////////////////////
// The following code example creates a Connection to the Recital // Database Server, and a gateway to the Recital Southwind database. // It then retrieves all the customers via the JDBC driver. public void SelectCustomers() { // setup the Connection URL for JDBC String gateway = "jdbc:/usr/java/lib/RecitalJDBC/Recital/sql/RecitalDriver;"+ "jdbc:Recital:Data Source=localhost;database=southwind"; String url = "jdbc:Recital:Data Source=localhost;gateway=\""+gateway+"\";
// load the Recital Universal JDBC Driver new RecitalDriver(); // create the connection Connection con = DriverManager.getConnection(url); // create the statement Statement stmt = con.createStatement(); // perform the SQL query ResultSet rs = stmt.executeQuery("SELECT CustomerID, CompanyName FROM Customers"); // fetch the data while (rs.next()) { String CompanyID = rs.getString("CustomerID"); String CompanyName = rs.getString("CompanyName"); // do something with the data... } // Release the statement stmt.close(); // Disconnect from the server con.close(); }
Published in Blogs
Read more...
By default Recital uses PAM to authenticate users.  It is also possible to tell PAM to use Kerberos.  Simply replace the existing entries in the /etc/pam.d/recital file with the ones below:

auth       sufficient   pam_krb5.so try_first_pass
auth       sufficient   pam_unix.so shadow nullok try_first_pass
account    required     pam_unix.so broken_shadow
account    [default=bad success=ok user_unknown=ignore] pam_krb5.so
Published in Blogs
Read more...
And apparently IE9 will support rounded corners.
http://kbala.com/ie-9-supports-corner-radius/
Published in Blogs
Read more...

If you have 4 GB or more RAM use the Linux kernel compiled for PAE capable machines. Your machine may not show up total 4GB ram. All you have to do is install PAE kernel package.

This package includes a version of the Linux kernel with support for up to 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).

The non-PAE kernel can only address up to 4GB of memory. Install the kernel-PAE package if your machine has more than 4GB of memory (>=4GB).

# yum install kernel-PAE

If you want to know how much memory centos is using type this in a terminal:

# cat /proc/meminfo
Published in Blogs
Read more...

In this article Barry Mavin, CEO and Chief Software Architect for Recital, gives details on Working with user-defined Functions in the Recital Database Server.

Overview

User-defined functions (UDFs) are collections of statements written in the Recital 4GL (compatible with Visual FoxPro) stored under a name and saved in a Database. User-defined functions are just-in-time compiled by the Recital database engine. User-defined functions can be used in SQL statements to extend the power and flexibility of the inbuilt functions. Using the Database Administrator in Recital Enterprise Studio, you can easily create, view, modify, and test Stored Procedures, Triggers, and user-defined functions.

Tip
You can also extend the Recital Database Server with C Extension Libraries and use the functions defined within that library also.

Creating and Editing user-defined functions

To create a new User-defined function,  right-click the Procedures node in the Databases tree of the Project Explorer and choose Create. To modify an existing User-defined function select the User-defined function in the Databases Tree in the Project Explorer by double-clicking on it or selecting Modify from the context menu. By convertion we recommend that you name your User-defined functions beginning with "f_xxx_", where xxx is the name of the table that they are associated with.

Testing the user-defined function

To test run the user-defined function, select it in the Databases Tree in the Project Explorer by double-clicking on it. Once the Database Administrator is displayed, click the Run button to run it.

Example

Example: user-defined function "f_order_details_total".
////////////////////////////////////////////////////////////////////////
// example user-defined function
function f_order_details_total(pUnitprice, pQuantity, pDiscount)
    return (pUnitprice + pQuantity + pDiscount) > 0
endfunc
Example: using the user-defined function in a SQL SELECT statement.
////////////////////////////////////////////////////////////////////////
// sample code to use a user-defined function in a SQL SELECT statement
select * from customers where f_order_details_total(Unitprice, Quantity, Discount)

Using user-defined function libraries with the Recital Database Server

You can place all of the user-defined functions associated with a particular table into a procedure library. You then define an Open Trigger for the table that opens up the procedure library whenever the table is accessed. This is a much faster way of using user-defined functions as it reduces the amount of file open/close operations during a query and also simplifies development and maintenance.

By convertion we recommend that you should name the library using the convention "lib_xxx", where xxx is the name of the table that the library is associated with.

Example: procedure library in lib_order_details.
////////////////////////////////////////////////////////////////////////
// example user-defined functions
function f_order_details_total(pUnitprice, pQuantity, pDiscount)
    return (pUnitprice * pQuantity - pDiscount) > 0
endfunc

function f_order_details_diff(pUnitprice, pQuantity, pDiscount, pValue)
    return f_order_details_total(pUnitprice, pQuantity, pDiscount) - pValue
endfunc
Example: Open Trigger in dt_order_details_open.
////////////////////////////////////////////////////////////////////////
// This trigger will open up the procedure library when the table is opened
set procedure to lib_order_details additive
Example: Close Trigger in dt_order_details_close.
////////////////////////////////////////////////////////////////////////
// This trigger will close the procedure library when the table is closed
close procedure lib_order_details
Example: using the user-defined function in a SQL SELECT statement.
////////////////////////////////////////////////////////////////////////
// sample code to use a user-defined function in a SQL SELECT statement
select * from customers where f_order_details_total(Unitprice, Quantity, Discount)

User-defined functions can also be used with any of the Client Drivers that work with the Recital Database Server.

Published in Blogs
Read more...
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 based on dynamic values from another table.

Using the products.dbf table from the southwind sample database, validation can be added to the categoryid field to ensure it matches an existing categoryid from the categories.dbf table.
open database southwind
alter table products add constraint;
(categoryid set check rlookup(products.categoryid,categories))
The rlookup() function checks whether an expression exists in the index (master or specified) of the specified table .  An attempt to update categoryid with a value not in the list will give an error: Validation on field 'CATEGORYID' 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.

validation


Published in Blogs
Read more...
Awk is an powerful text processing language that allows you to manipulate files containing columns of data and strings. Awk is extremely useful, both for general operation of Unix commands, and for data transformation.
 
Introduced in Recital 10 is the PIPETOSTR() function (as well as backticks `` inside strings) which can be used  in conjunction with awk to transform recital data.
 
The following links provide good tutorials on awk:
Published in Blogs
Read more...
Recital 10 introduced the ARRAY( ) functions. This function operates in the same way as the PHP ARRAY( ) function. It can be used to declare a dynamic or associative array and optionally initialize it with elements.
// declare an empty dynamic array
a = array()

// declare a simple dynamic array
a = array("barry", "recital", "boston")
foreach a as value
    echo value
endfor

// declare an associative array
a = array("name" => "barry", "company" => "recital", "location" => "boston")
echo "length of a is " + len(a)
foreach a as key => value
    echo "key=" + key + ", value=" + value
endfor
Published in Blogs
Read more...

Copyright © 2025 Recital Software Inc.

Login

Register

User Registration
or Cancel