summaryrefslogtreecommitdiff
path: root/demos/blog-tutorial/protected/pages/Day2/ConnectDB.page
diff options
context:
space:
mode:
authorxue <>2007-04-06 12:52:54 +0000
committerxue <>2007-04-06 12:52:54 +0000
commitd0bdd3144dfc972450d79ddaf6197a30b27eacc0 (patch)
treecb89b3a0be407d38300821d4ba3edd6ee73bb44d /demos/blog-tutorial/protected/pages/Day2/ConnectDB.page
parent34772099513df0734d3149e7b6d2d011f1f5e5e7 (diff)
Fixed some issues in day 2.
Diffstat (limited to 'demos/blog-tutorial/protected/pages/Day2/ConnectDB.page')
-rw-r--r--demos/blog-tutorial/protected/pages/Day2/ConnectDB.page7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/blog-tutorial/protected/pages/Day2/ConnectDB.page b/demos/blog-tutorial/protected/pages/Day2/ConnectDB.page
index 90db11ef..1d036577 100644
--- a/demos/blog-tutorial/protected/pages/Day2/ConnectDB.page
+++ b/demos/blog-tutorial/protected/pages/Day2/ConnectDB.page
@@ -28,18 +28,19 @@ We modify our application configuration file <tt>protected/application.xml</tt>
<com:TTextHighlighter CssClass="source" Language="xml">
<modules>
- <module class="System.Data.ActiveRecord.TActiveRecordConfig">
+ <module id="db" class="System.Data.TDataSourceConfig">
<database ConnectionString="sqlite:protected/data/blog.db" />
</module>
+ <module class="System.Data.ActiveRecord.TActiveRecordConfig" ConnectionID="db" />
</modules>
</com:TTextHighlighter>
<p>
-The configuration above shows that we are adding to our application a <a href="http://www.pradosoft.com/demos/quickstart/?page=Fundamentals.Modules">module</a> whose class is specified in the <a href="http://www.pradosoft.com/demos/quickstart/?page=Fundamentals.Components">namespace</a> format as <tt>System.Data.ActiveRecord.TActiveRecordConfig</tt>. Through this module, Active Record will automatically establish a DB connection by using the connection information given in <tt>ConnectionString</tt>.
+The configuration above shows that we are adding two <a href="http://www.pradosoft.com/demos/quickstart/?page=Fundamentals.Modules">modules</a> to our application. The <tt>TDataSourceConfig</tt> module is configured with the connection string <tt>sqlite:protected/data/blog.db</tt> which points to our SQLite database. This connection is used by the <tt>TActiveRecordConfig</tt> module which is required by Active Record.
</p>
<com:InfoBox>
-One may set up two or more DB connections in the application configuration. For more details, see the <a href="http://www.pradosoft.com/demos/quickstart/?page=Database.ActiveRecord">Active Record Documentation</a>. And of course, one may also explicitly create a DB connection in PHP code using the <a href="http://www.pradosoft.com/demos/quickstart/?page=Database.DAO">TDbConnection</a> component in PDO.
+One may set up two or more DB connections in the application configuration. For more details, see the <a href="http://www.pradosoft.com/demos/quickstart/?page=Database.ActiveRecord">Active Record documentation</a>. And of course, one may also explicitly create a DB connection in PHP code using the <a href="http://www.pradosoft.com/demos/quickstart/?page=Database.DAO">TDbConnection</a> component in PDO.
</com:InfoBox>
</com:TContent> \ No newline at end of file