Installing the Rico Examples

Simply unzipping the Rico distribution file and copying the resulting directory structure into your web service's path should be sufficient to get most, if not all, of the examples running. If you have installed it into a directory called "rico" under the web service root, then you should be able to point your browser to the following address to access the examples:

http://myserver.mydomain.com/rico/examples/

Or if you installed it on your personal computer, then access it as:

http://localhost/rico/examples/

On a server running IIS6, you will need to change the security settings for ASP in order to run the ASP examples. In particular, you will need to enable ASP files to reference include files in the parent directory. To do this, follow these steps:

  1. Open ISS Manager
  2. Right click on "Default Web Site" and select "Properties" from the context menu
  3. Click on the "Home Directory" tab
  4. Click the "Configuration" button
  5. Click the "Options" tab of the new window
  6. Check the box labelled "Enable parent paths"

LiveGrid Examples

Many of the LiveGrid examples fetch data from the Northwind sample database. In order to get these examples to work you will need to do 2 things:

  1. Create the Northwind database
  2. Modify the database connection settings which reside in the applib.* file

Creating the Northwind database

The examples/data directory contains the data needed to run the Rico LiveGrid examples. Data is available in 3 formats:

  1. northwind.mdb - this is the standard Northwind database provided by Microsoft, with the exception that the [Order Details] table has been renamed to Order_Details. If you will be accessing the ASP or .net examples, then no database configuration is necessary -- those examples will directly access this database using the Microsoft Jet driver.
  2. mysql-northwind.sql - a backup file for MySQL (created using MySQL version 4.1)
  3. ORA-EXPDAT.DMP - an Oracle export file for the Northwind schema -- generated using the "exp" utility in Oracle XE. The password for this schema is "password".

A version of the Northwind database for MS SQL Server 2000/2005 is available as a free download from Microsoft. After installing it, you will need to either rename the [Order Details] table to Order_Details, or create a new view named Order_Details defined as "select * from [Order Details]".

Database connection settings

Specific instructions depend upon your environment:

Database PHP ASP .net Perl
Connection settings located in: examples/php/applib.php examples/asp/applib.asp examples/dotnet/applib.ascx examples/perl/ricoXMLquery.pl
MySQL return $GLOBALS['oDB']->MySqlLogon( "northwind", "userid", "password");

oDB.Use_MySQL

oDB.SqlSvr="localhost"

Set the user id, and password in the SqlLogon() statement.

The MySQL 3.51 ODBC driver must also be installed.

Public const dbDialect = "MySQL"

Set the server name, user id, and password in OpenDB()

The MySQL 3.51 ODBC driver must also be installed.

$dbh = DBI->connect( "dbi:mysql:northwind", "userid", "password");
SQL Server $oDB->Dialect="TSQL";

return $GLOBALS['oDB']->MSSqlLogon( "ServerName\InstanceName", "Northwind", "userid", "password");

Omit InstanceName when connecting to the default instance

oDB.SqlSvr= "ServerName\InstanceName"

Omit InstanceName when connecting to the default instance

Set the user id, and password in the SqlLogon() statement.

Public const dbDialect = "TSQL"

Set the server name, user id, and password in OpenDB()

MS Access $oDB->Dialect="Access";

return $GLOBALS['oDB']->OdbcLogon( "northwindDSN", "Northwind", "Admin", "");

oDB.Use_Access Server.Mappath( "../data/northwind.mdb")

This is the default, so no changes should be required.

Public const dbDialect = "Access"

This is the default, so no changes should be required.

Oracle $oDB->Dialect="Oracle";

return $GLOBALS['oDB']->OracleLogon( "XE", "northwind", "password");

oDB.Use_Oracle "XE" Public const dbDialect = "Oracle"

Set the server name and password in OpenDB()

DB2

not supported

Public const dbDialect = "DB2"

Set the server name, user id, and password in OpenDB()