To access the menu bar in Recital, press the / key.
Full details on Recital Function Keys can be found in the Key Assist section of the Help menu, or in our documentation wiki here.
In this article Yvonne Milne looks at the use of the Recital Remote Data Connectivity Functions with Recital Database Gateways.
- For building shared libraries on the MAC the following need to be set
-
- The shared library file extension should be .dylib
- The compile flag is -dynamic
- For accessing the shared libraries at runtime
-
- DYLD_LIBRARY_PATH needs to be set to the location of the shared libraries
- Useful utilities for shared library support
-
- The following command will display the table of contents of the dynamically linked library
otool -TV sharedlibraryfile.dylib
DirectoryIndex default.rsp index.html
For systems that do not have the xterm libraries installed, please install these to use xterm, or set the DB_TERM environment variable to start Recital from a terminal:
DB_TERM=gnome-terminal; export DB_TERM
This setting can be added to the /opt/recital/conf/recital.conf (text) file to make it available system-wide.
Please note that the Recital ODBC Driver for Linux requires a 32 bit ODBC Driver Manager.
Centos 6:
sudo yum install zlib-devel.i686 pam-devel.i686(and accept dependencies)
Then run the installer in text mode
sudo ./recital-10.0.3-linux32.bin --mode textRun Recital with sudo the first time, to set the system filetype compatiblity settings.
sudo recitalAfter saving the compatibility settings, quit to exit, then run Recital as your preferred user.
> quit
$ recital
RedHat / Fedora family:
sudo yum install zlib-devel.i686 pam.i686(and accept dependencies)
Then run the installer in text mode
sudo ./recital-10.0.3-linux32.bin --mode textRun Recital with sudo the first time, to set the system filetype compatiblity settings.
sudo recitalAfter saving the compatibility settings, quit to exit, then run Recital as your preferred user.
> quit
$ recital
Ubuntu family:
sudo apt-get install ia32-libsIn later versions of Ubuntu, ia32-libs is obsolete. The following package should be installed:
sudo apt-get install lib32z1Ubuntu 12.04 and above also require the following:
sudo apt-get install libpam0g:i386Then run the installer in text mode
sudo ./recital-10.0.3-linux32.bin --mode textRun Recital with sudo the first time, to set the system filetype compatiblity settings.
sudo recitalAfter saving the compatibility settings, quit to exit, then run Recital as your preferred user.
> quit
$ recital
// 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
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
// the click event handler
private function onclick_sourcetree(e:Event):void {
yourTree.editable = false;
}
// the doubleclick event handler
private function ondoubleclick_sourcetree(e:Event):void {
yourTree.editable = true;
yourTree.editedItemPosition = {columnIndex:0, rowIndex:sourceTree.selectedIndex};
} In this article Barry Mavin, CEO and Chief Software Architect for Recital, details Working with Stored Procedures in the Recital Database Server.
Overview
Stored procedures and user-defined functions are collections of SQL statements and optional control-of-flow statements written in the Recital 4GL (compatible with VFP) stored under a name and saved in a Database. Both stored procedures and user-defined functions are just-in-time compiled by the Recital database engine. Using the Database Administrator in Recital Enterprise Studio, you can easily create, view, modify, and test Stored Procedures, Triggers, and user-defined functions
Creating and Editing Stored Procedures
To create a new Stored Procedure, right-click the Procedures node in the Databases tree of the Project Explorer and choose Create. To modify an existing stored procedure select the Stored Procedure 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 Stored Procedures beginning with "sp_xxx_", user-defined functions with "f_xxx_", and Triggers with "dt_xxx_", where xxx is the name of the table that they are associated with.
Testing the Procedure
To test run the Stored Procedure, select the Stored Procedure 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 the procedure.
Getting return values
Example Stored Procedure called "sp_myproc":
parameter arg1, arg2 return arg1 + arg2
Example calling the Stored Procedure from C# .NET:
////////////////////////////////////////////////////////////////////////
// include the references below
using System.Data;
using Recital.Data;
////////////////////////////////////////////////////////////////////////
// sample code to call a Stored Procedure that adds to numeric values together
public int CallStoredProcedure()
{
RecitalConnection conn = new
RecitalConnection("Data Source=localhost;Database=southwind;uid=?;pwd=?");
RecitalCommand cmd = new RecitalCommand();
cmd.Connection = conn;
cmd.CommandText = "sp_myproc(@arg1, @arg2)";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters["@arg1"].Value = 10;
cmd.Parameters["@arg2"].Value = 20;
conn.Open();
cmd.ExecuteNonQuery();
int result = (int)(cmd.Parameters["retvalue"].Value); // get the return value from the sp
conn.Close();
return result;
}
Writing Stored Procedures that return a Resultset
If you want to write a Stored Procedure that returns a ResultSet, you use the SETRESULTSET() function of the 4GL. Using the Universal .NET Data Provider, you can then execute the 4GL Stored Procedure and return the ResultSet to the client application for processing. ResultSets that are returned from Stored Procedures are read-only.
Example Stored Procedure called "sp_myproc":
parameter query
select * from customers &query into cursor "mydata"
return setresultset("mydata")
Example calling the Stored Procedure from C# .NET:
////////////////////////////////////////////////////////////////////////
// include the references below
using System.Data;
using Recital.Data;
////////////////////////////////////////////////////////////////////////
// sample code to call a stored procedure that returns a ResultSet
public void CallStoredProcedure()
{
RecitalConnection conn = new
RecitalConnection("Data Source=localhost;Database=southwind;uid=?;pwd=?");
RecitalCommand cmd = new RecitalCommand();
cmd.Connection = conn;
cmd.CommandText = "sp_myproc(@query)";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters["@query"].Value = "where not deleted()";
conn.Open();
RecitalDataReader dreader = cmd.ExecuteReader();
int sqlcnt = (int)(cmd.Parameters["sqlcnt"].Value); // returns number of affected rows
while (dreader.Read())
{
// read and process the data
}
dreader.Close();
conn.Close();
}