Back-propagated Rico 3 fix for Rico.TableColumn.Link to Rico 2. Added server-side...
[infodrom/rico3] / documentation / InstallNotes.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\r
2 <html>\r
3 <head>\r
4 <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
5 <title>Installing the Rico Examples</title>\r
6 \r
7 <link href="ricoDocs.css" rel="Stylesheet" type="text/css">
8 <style type="text/css">\r
9 tbody td {\r
10   font-size: 8pt;\r
11   vertical-align: top;\r
12 }\r
13 p.comment {\r
14   color: #888;\r
15 }
16 </style>\r
17 </head>\r
18 \r
19 <body>\r
20 <h1>Installing the Rico Examples</h1>\r
21 \r
22 <p>Simply unzipping the Rico distribution file and copying the resulting\r
23 directory structure into your web service's path should be sufficient to get\r
24 most, if not all, of the examples running. If you have installed it into a\r
25 directory called "rico" under the web service root, then you should be able\r
26 to point your browser to the following address to access the examples and documentation:\r
27 <blockquote><p>http://myserver.mydomain.com/rico/</blockquote>\r
28 <p>Or if you installed it on your personal computer, then access it as:\r
29 <blockquote><p>http://localhost/rico/</blockquote>\r
30 \r
31 <h2>File Locations</h2>\r
32 \r
33 <p>The Rico distribution is divided into 4 subdirectories:\r
34 <ul>\r
35 <li><strong>ricoClient</strong> - contains all client-side Rico files, including javascript, css, and image files.\r
36 <li><strong>plugins</strong> - contains code that runs on the server to support LiveGrids and SimpleGrids.\r
37 Plug-ins are currently provided for ASP, PHP, and .net. A Perl plug-in with limited functionality\r
38 is also included.\r
39 <li><strong>examples</strong> - contains sample code for ASP, PHP, .net, Perl, and HTML.\r
40 The examples/data directory contains sample databases for the examples pertaining to LiveGrid.\r
41 Databases are provided for MS Access, Oracle, and MySQL. Instructions for installing the data\r
42 onto SQL Server are also included.\r
43 <li><strong>documentation</strong> - documentation for using the Rico framework.\r
44 </ul>\r
45 </p>\r
46 \r
47 <h2>IIS Configuration</h2>\r
48 \r
49 <p>Rico can be served from any web server. This section describes some configuration issues specific to IIS on Windows.\r
50 \r
51 <p>On a server running IIS6 or higher, you will need to change the security settings for ASP\r
52 in order to run the ASP examples. In particular, you will need to enable ASP files\r
53 to reference include files in the parent directory. To do this, follow these steps:\r
54 <ol>\r
55 <li>Open ISS Manager\r
56 <li>Right click on "Default Web Site" and select "Properties" from the context menu\r
57 <li>Click on the "Home Directory" tab\r
58 <li>Click the "Configuration" button\r
59 <li>Click the "Options" tab of the new window\r
60 <li>Check the box labelled "Enable parent paths"\r
61 </ol>\r
62 \r
63 <p>In order for the sample scripts to read the Northwind Access database on a computer running IIS7 (e.g. Vista PCs), \r
64 you will need to disable the loadUserProfile setting using this command:\r
65 <pre>\r
66 %windir%\system32\inetsrv\appcmd set config -section:applicationPools /[name='DefaultAppPool'].processModel.loadUserProfile:false\r
67 </pre>\r
68 The technique is described in \r
69 <a href="http://blogs.iis.net/bills/archive/2006/10/18/loadUserProfile-and-IIS7-_2D00_-understanding-temporary-directory-failures.aspx">\r
70 this article</a>. If you prefer not to change the loadUserProfile setting, the alternative is to load \r
71 the Northwind database into SQL Server or MySQL and change connection settings in the relevant applib file as described below.\r
72 \r
73 <h2>LiveGrid Examples</h2>\r
74 \r
75 <p>Many of the LiveGrid examples fetch data from the Northwind sample database.\r
76 In order to get these examples to work you will need to do 2 things:\r
77 <ol>\r
78 <li>Create the Northwind database\r
79 <li>Modify the database connection settings which reside in the applib.* file\r
80 </ol>\r
81 \r
82 <h2>Creating the Northwind database</h2>\r
83 \r
84 <p>The examples/data directory contains several different formats of the database needed \r
85 to run most of the Rico LiveGrid ASP, .net, and PHP examples.\r
86 \r
87 <p>Data is provided in these formats:\r
88 \r
89 <ol>\r
90 <li>northwind.mdb - this is the standard Northwind database provided by Microsoft, \r
91 with the exception that the [Order Details] table has been renamed to Order_Details.\r
92 If you will be accessing the ASP or .net examples, then no database configuration is\r
93 necessary -- those examples will directly access this database using the Microsoft Jet driver.\r
94 \r
95 <li>mysql-northwind.sql - a backup file for MySQL (created using MySQL version 4.1)\r
96 \r
97 <li>mysql-northwind-dblquote.sql - same as above, except all instances of \' \r
98 have been changed to '' (recommended for MySQL version 5 or above)\r
99 \r
100 <li>ORA-EXPDAT.DMP - an Oracle export file for the Northwind schema -- generated using the "exp" utility in \r
101 <a href='http://www.oracle.com/technology/products/database/xe/index.html'>Oracle XE</a>. \r
102 The password for this schema is "password".\r
103 </ol>\r
104 \r
105 <p>A version for MS SQL Server 2000 &amp; 2005 is available as a free download from <a href='http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&amp;displaylang=en'>msdn.microsoft.com</a>. \r
106 After downloading it, you should follow <a href='http://msdn2.microsoft.com/en-us/library/ms227484.aspx'>Microsoft's intructions to install it</a>.\r
107 Finally, you will need to either rename the [Order Details] table  to Order_Details, \r
108 or create a view named Order_Details using the following SQL statement:\r
109 <pre>\r
110 \r
111 create view Order_Details as select * from [Order Details]\r
112 \r
113 </pre>\r
114 \r
115 \r
116 <h2>Database connection settings</h2>\r
117 \r
118 <p>Specific instructions depend upon your environment:\r
119 <table border='1' cellspacing='0' cellpadding='3'>\r
120 <thead><tr>\r
121 <th>Database</th>\r
122 <th>PHP</th>\r
123 <th>ASP</th>\r
124 <th>.net</th>\r
125 <th>Perl</th>\r
126 </tr></thead>\r
127 <tbody>\r
128 <tr><td>Connection settings located in:</td>\r
129 <td>examples/php/applib.php</td>\r
130 <td>examples/asp/applib.asp</td>\r
131 <td>examples/dotnet/applib.ascx</td>\r
132 <td>examples/perl/ricoXMLquery.pl</td>\r
133 \r
134 <tr><th>MySQL</th>\r
135 <td>return $GLOBALS['oDB']->MySqlLogon( "northwind", "userid", "password");</td>\r
136 <td>oDB.Use_MySQL\r
137 <p>oDB.SqlSvr="localhost"\r
138 <p class='comment'>Set the user id, and password in the SqlLogon() statement.\r
139 <p class='comment'>The Rico plug-in assumes that the MySQL 3.51 ODBC driver has been installed.\r
140 If you are using a later ODBC driver, such as 5.1, then you will need to add this line:\r
141 <p>oDB.OdbcDriver="{MySQL ODBC 5.1 Driver}"\r
142 </td>\r
143 <td>Public const dbDialect = "MySQL"\r
144 <p class='comment'>Set the server name, user id, and password in OpenDB()\r
145 <p class='comment'>The MySQL 3.51 ODBC driver must also be installed.\r
146 </td>\r
147 <td>$dbh = DBI->connect( "dbi:mysql:northwind", "userid", "password");</td>\r
148 \r
149 <tr><th>SQL Server</th>\r
150 <td>\r
151 <p>return $GLOBALS['oDB']->MSSqlLogon( "ServerName\InstanceName", "Northwind", "userid", "password");\r
152 <p class='comment'>Omit InstanceName when connecting to the default instance\r
153 </td>\r
154 <td>oDB.SqlSvr= "ServerName\InstanceName"\r
155 <p class='comment'>Omit InstanceName when connecting to the default instance\r
156 <p class='comment'>Set the user id, and password in the SqlLogon() statement.\r
157 </td>\r
158 <td>Public const dbDialect = "TSQL"\r
159 <p class='comment'>Set the server name, user id, and password in OpenDB()</td>\r
160 <td>&nbsp;</td>\r
161 \r
162 <tr><th>MS Access</th>\r
163 <td>\r
164 $oDB->Dialect="Access";\r
165 <p>return $GLOBALS['oDB']->OdbcLogon( "northwindDSN", "Northwind", "Admin", "");</td>\r
166 <td>oDB.Use_Access Server.Mappath( "../data/northwind.mdb")\r
167 <p class='comment'>This is the default, so no changes should be required.</td>\r
168 <td>Public const dbDialect = "Access"\r
169 <p class='comment'>This is the default, so no changes should be required.</td>\r
170 <td>&nbsp;</td>\r
171 \r
172 <tr><th>Oracle</th>\r
173 <td>\r
174 $oDB->Dialect="Oracle";\r
175 <p>return $GLOBALS['oDB']->OracleLogon( "XE", "northwind", "password");</td>\r
176 <td>oDB.Use_Oracle "XE"</td>\r
177 <td>Public const dbDialect = "Oracle"\r
178 <p class='comment'>Set the server name and password in OpenDB()\r
179 <td>&nbsp;</td>\r
180 \r
181 <tr><th>DB2</th>\r
182 <td><p class='comment'>not supported</td>\r
183 <td>&nbsp;</td>\r
184 <td>Public const dbDialect = "DB2"\r
185 <p class='comment'>Set the server name, user id, and password in OpenDB()</td>\r
186 <td>&nbsp;</td>\r
187 \r
188 <tr><th>PostgreSQL</th>\r
189 <td>return $GLOBALS['oDB']->PostgreSqlLogon(<i>connection_string</i>);\r
190 <p class='comment'>The connection_string can be empty to use all default parameters, or it can contain one or more parameter settings separated by whitespace. Each parameter setting is in the form keyword = value. Spaces around the equal sign are optional. To write an empty value or a value containing spaces, surround it with single quotes, e.g., keyword = 'a value'. Single quotes and backslashes within the value must be escaped with a backslash, i.e., \' and \\.\r
191 <p class='comment'>The currently recognized parameter keywords are: host, hostaddr, port, dbname (defaults to value of user), user, password, connect_timeout, options, tty (ignored), sslmode, requiressl (deprecated in favor of sslmode), and service. Which of these arguments exist depends on your PostgreSQL version. \r
192 </td>\r
193 <td>&nbsp;</td>\r
194 <td>&nbsp;</td>\r
195 <td>&nbsp;</td>\r
196 \r
197 </tbody>\r
198 </table>\r
199 \r
200 </body>\r
201 </html>\r