Recital

Login Register
There is a good article here this describes agile software development techniques. This is what we have always been doing but it's nice to see it defined formally.

We use this technique ourselves on our development portal.
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...
Use iptables to restrict access to Recital Web only from localhost.

iptables -I INPUT -j ACCEPT -p tcp --destination-port 8001 -i lo
iptables -A INPUT -j DROP -p tcp --destination-port 8001 -i eth0


Published in Blogs
Read more...

STRERROR()

Syntax

STRERROR( [ <expN> ] )

Description

The STRERROR() function returns a string describing the last operating system error message. If the optional error number is specified then the related operating system error message will be returned.

Example

mqdes=mqcreate("/myqueue", 2)
 if (mqdes < 0)
     messagebox(strerror()+",errno="+alltrim(str(error())))
    return
 endif
 rc = mqsend(mqdes, "Test message")
 if (rc < 0)
     messagebox(strerror()+",errno="+alltrim(str(error())))
    return
 endif
 mqclose(mqdes)

Published in Blogs
Read more...

Privacy Policy

We respect and are committed to protecting your privacy.

We require that you provide some personal information, to allow us to provide the services we do to the users of recitalsoftware.com, and to improve recitalsoftware.com. The type of information we collect, how we use it, and what choices you have, are detailed in this policy.

Information Collection and Use

We collect the information you provide when you register for an account or complete an information request form.

We use this information to satisfy your requests for further information, to customize our responses and our future communication with you, and to contact you, regarding development and events in the projects or areas of recitalsofware.com that you have expressed interest in, or in recitalsoftware.com, in general.

We make every effort to allow you to opt-in and opt-out of receiving messages from recitalsoftware.com. However, if you are receiving messages from us and cannot find a way to unsubscribe, please contact us at This email address is being protected from spambots. You need JavaScript enabled to view it..

Information Sharing

We will not release your personal information to anyone by any method, including selling, renting, or sharing, unless:

  • you grant us permission
  • we are required to do so by law

We will not share personal identification information data, either for single individuals or groups, with any parties, including those affiliated with recitalsoftware.com, such as members or sponsors.

How We Use Cookies

This website uses cookies. A cookie is a small amount of text data, sent from our webserver to your browser, and stored on your device. The cookie is sent back to the webserver each time the browser connects to this site. We use cookies to personalize the site and to streamline your interaction with the site.

It may be possible to configure your browser to refuse cookies, or to ask you to accept each time a cookie is offered. If you choose not to accept cookies, areas of this site may have reduced functionality or performance.

Software on our servers, or third party web statics services, may store your IP address, and other information passed on by your browser (such as browser version, operating system, screen size, language, etc). recitalsoftware.com and/or third party services will aggregate this information to provide usages statistics for this website. We use this information to optimize the design, structure, and performance of this site. In particular, we use Google Analytics to provide usage statistics. For more information, read the Google Analytics Privacy Policy.

Data Security

recitalsoftware.com is also committed to the security of your personal information. We train those who work on recitalsoftware.com on this privacy policy. On our site, we use SSL (Secure Sockets Layer) to protect your personal information, by encrypting your information when you send it to recitalsoftware.com.

Public Forum Content

recitalsoftware.com makes available to its users communication forums, such as mail lists, blogs, and others. Be aware that any information or messages you share in these forums becomes public information immediately. Exercise caution in determining whether to disclose any of your personal information. recitalsoftware.com reserves the right to act as necessary to preserve the integrity of the site and its forums, including removing any and all posts deemed vulgar or inappropriate.

Children's Online Privacy

Regarding children under the age of 13, recitalsoftware.com does not knowingly:

  • accept personal information from them
  • allow them to become registered members of our web site

Updates to this Privacy Policy

We may update this policy. We will contact you if we make any substantial changes in how we use your personal information.

This privacy policy was last updated on July 1, 2010.

Contact Information

If you have any questions about this privacy policy itself, or on how we use personal information on recitalsoftware.com, please contact us at This email address is being protected from spambots. You need JavaScript enabled to view it..

Published in Blogs
Read more...

Recital is a rich and versatile product with many ways to do the same thing. Developers usually write code in the way that they are accustomed to without paying much attention to how this will perform in a multi-user environment with large amounts of users and transactions. The best way to optimize Recital applications is to use the built-in tuning capabilities introduced in Recital 10.

Published in Blogs
Read more...
Recital 10 introduced a FOREACH command, much like PHP and some other languages. This simply gives an easy way to iterate over arrays. foreach works on arrays and objects, and will issue an error when you try to use it on a variable with a different data type or an uninitialized variable. There are two syntaxes; the second is a minor but useful extension of the first:
FOREACH array_expression AS value
    statements...
ENDFOR
FOREACH array_expression AS key => value statements... ENDFOR
The first form loops over the array given by array_expression. On each loop, the value of the current element is assigned to value and the internal array pointer is advanced by one (so on the next loop, you'll be looking at the next element).
The second form does the same thing, except that the current element's key will be assigned to the variable key on each loop. This form works only on associative arrays and objects.
Published in Blogs
Read more...

If you are running your Redhat/Centos or Fedora machine in an enterprise environment you may be sitting behind a network proxy server like squid.

If you try and update or install software it will fail with timeouts or errors contacting the repository mirrors.

To configure YUM to work with your proxy server you need to add the following line to your /etc/yum.conf file.

Anonymous proxy configuration:
proxy=http://yourproxyip:port/

If your proxy server requires authentication add the following lines to your /etc/yum.conf file instead.

proxy=http://yourproxyip:port/
proxy_username=youruser
proxy_password=yourpassword

 You will be able to update and install software now, give it a go!

Published in Blogs
Read more...

The getUIComponentBitmapData method can create bitmapdata for a given IUIComponent. Pass any UIcomponent to get its respective bitmapdata.

public static function getUIComponentBitmapData(target:IUIComponent):BitmapData {      
    var resultBitmapData:BitmapData = new BitmapData(target.width, target.height);     
    var m:Matrix = new Matrix();     
    resultBitmapData.draw(target, m);     
    return resultBitmapData; 
}

Now convert the bitmapdata to a jpeg bytearray.

private static function encodeToJPEG(data:BitmapData, quality:Number = 75):ByteArray {     
    var encoder:JPGEncoder = new JPGEncoder(quality);     
    return encoder.encode(data); 
}

Now encode the ByteArray into Base64.

public static function base64Encode(data:ByteArray):String {     
    var encoder:Base64Encoder = new Base64Encoder();     
    encoder.encodeBytes(data);     
    return encoder.flush(); 
}

Upload the base64 encoded ByteArray to the server.

public static uploadData():void {     
    var url:String = "saveFile.php";     
    var urlRequest:URLRequest = new URLRequest(url);     
    urlRequest.method = URLRequestMethod.POST;     
    var urlLoader:URLLoader = new URLLoader();     
    var urlVariables:URLVariables = new URLVariables();     
    urlVariables.file = jpgEncodedFile;    // as returned from base64Encode()     
    urlLoader.data = urlVariables;     
    urlLoader.load(urlRequest); 
}

The saveFile.php file on the server.


Published in Blogs
Read more...

Copyright © 2024 Recital Software Inc.

Login

Register

User Registration
or Cancel