Chapter 2 Getting Started with PowerDynamo
Overview
The tutorials in this chapter guide you through:
- Inspecting the sample Web site included in PowerDynamo,
using Sybase Central.
- Creating a dynamic HTML page containing
a SQL query and viewing the results of the query.
- Creating a template containing a
script.
- Accessing the templates you have
created from a Web client (browser) on your own machine. This tutorial
introduces the PowerDynamo Personal Web Server.
- Accessing the templates you have
created from a Web client elsewhere on a network.
Topics covered in other chapters
This chapter does not include how to incorporate
a PowerDynamo Web site into an existing Web site managed by a Web
server - see "Configuring
Web Servers and Web sites".
Also, this chapter does not cover development
of a mobile intranet, although many of the concepts and tools you
need are covered. For more information on mobile intranets and SQL
Remote replication technology, see "Setting
Up a Mobile Intranet".
Before you begin
Before you begin, note the following:
- Most of these tutorials can be carried out on
a single computer, as long as the sample database can be accessed
from your machine.
If you are running PowerDynamo in a client/server
environment against a database server on a different machine, you
need a network connection to that machine.
- Before running the tutorials, install
the sample database. See "Installing the sample
database".
- For the tutorials involving a browser,
you need a TCP/IP protocol stack, and for the final tutorial
you need a connection to a network.
Installing the sample database
Installing the sample database is different
whether you are using Adaptive Server Anywhere or Adaptive Server
Enterprise.
Installing the sample database [Adaptive
Server Enterprise]
The tutorials are based on a sample Web site,
which is hosted in the Powersoft sample database. You must install
the Powersoft sample database before you can run the tutorials.
The sample database is two SQL scripts with
a controlling batch file, named psdemodb.bat.
The psdemodb.bat file is installed into the PowerDynamo\psdemo directory.
The SQL scripts carry out the following tasks
to create the sample database. Use command-line arguments to the
batch file to control the settings.
- Drops the psdemodb database
from the server, if it exists.
- Creates a 4MB device named tempdb_dev for
the tempdb database on the server.
- Adds a 4MB log to tempdb from
the new tempdb_dev device.
- Creates a 14MB device named psdemodb_dev.
- Creates a database named psdemodb on
the server, using the psdemodb_dev device,
and fills it with data.
To install the sample database:
-
Ensure that you can connect to
Adaptive Server Enterprise and have a valid user ID and password
with permissions to create a database.
-
From an operating system command prompt,
run the psdemodb batch file, using these arguments:
- The tempdb device location
and file name.
- The tempdb device
number. You should use the first free device number.
- The psdemodb device
location and file name.
- The psdemodb device
number. You should use the second free device number.
- The server name.
- The system administrator user ID.
- The system administrator password.
For new Adaptive Server Enterprise installations,
you can use the default system administrator user ID, which is sa,
and omit the password argument, as the default password is empty.
The default name of the server is the name of the machine on which
it is installed. For an Adaptive Server Enterprise newly installed
on a machine named my_machine
,
a typical command line is (you should type this all on one line):
psdemodb c:\syb11\data\tempdb.dev 8 c:\syb11\data\psdemodb.dev 9 my_machine sa
Modify the installed ODBC data source
PowerDynamo is able to use an ODBC interface
or an Open Client connection to access Adaptive Server Enterprise.
The Adaptive Server Enterprise setup creates an ODBC data source
for the sample database, but you must modify it to reflect the name
of the installed server before you can access the data source.
To modify the ODBC data source for the sample
database:
-
Start the ODBC Administrator and
select Sybase System 11 Sample from the list of available data sources.
Then click Setup.
-
Change the server name for the data source
to the name of the server you have installed. By default the server
name is the name of the machine.
-
Click OK on the Driver Setup window to
create the data source.
For information on how to connect to the sample
database using an Open Client connection see "Creating a connection profile for your Web site".
Installing the sample database [Adaptive
Server Anywhere]
The Adaptive Server Anywhere Setup automatically
installs a sample database named sademo.db,
and creates an ODBC data source named ASA 6.0 Sample. No further
preparation is required.
Starting Dynamo programs
The Dynamo programs are installed into the
Start Menu for Windows NT 4.0 and Windows 95, and are installed
into a Program Manager group for Windows NT 3.51.
For users of Windows 95 or Windows NT 4.0,
the Dynamo programs are added to the Start Menu, under Programs | Sybase | PowerDynamo
3.5. For users of Windows NT 3.51, the programs are added to the
PowerDynamo 3.5 program group.
PowerDynamo is accessible through Sybase Central.
Sybase Central can be started either from within the Sybase program
group (Start | Programs | Sybase | Sybase
Central) or from within the PowerDynamo program group under the heading
of Manage PowerDynamo
(Start | Programs | Sybase | PowerDynamo 3.5 | Manage
PowerDynamo).
Creating the sample
Web site
In Sybase Central, when you connect PowerDynamo
to a database that does not have a Web site stored for the user
ID and database, Dynamo asks you if you wish to create a Web site
for the supplied user ID.
To create the sample Web site:
-
Start Sybase Central, and select
Tools | Connection Profiles.
-
Select the Dynamo Demo connection profile
from the list.
-
Click Connect. Because no Web site exists
on the sample database for the user ID you have specified, Dynamo
prompts you to add a Web site. Click Yes to create a new Web site.
Check the boxes to load the documentation and
samples and enter a name for the main document folder in the site.
The documentation refers to this folder as "Site".
Click OK to create the site.
Once you have created the sample Web site,
you are ready to continue with the rest of the tutorials.
Copyright © 1999 Sybase, Inc. All rights reserved.
|
|