How to use the tools for the project

Download Report

Transcript How to use the tools for the project

Databases and the Web
CSE 444, Introduction to Database Systems
October 26, 1998
Zack Ives
Your Project
A database application with a Web front-end
By now, you’ve submitted your proposals and
should know what you want to do
Today you’ll get a look at the tools available in
the lab, and an idea of how to use them
Slides will be available on the web
You may want to pick up a book on Active
Server Pages, JScript, & Visual Interdev
The Basic Outline
Your project will (probably) consist of:
A logical schema
A bunch of data in tables created within SQL Server
Indexing, views, and so on
A web front-end done with SQL, Active Server
Pages, VBScript/JScript, and Design-Time Controls
Some SQL queries over the database and/or views
Some VBScript/JScript code
Some forms that display the data, make calculations, and
allow updates
Terminology
ASP
DTC - Design Time Controls (drag & drop
controls)
Record Set (aka Result Set)
Cursor (in the database sense)
DSN
ODBC
OLE DB
ADO
Setting Things Up...
You’ll need to:
Make sure SQL Server is working
Create a set of tables in your database
Set up a System DSN in ODBC
Set up a project in Visual Interdev
Create ASP files and scripts
SQL Server Enterprise Mgr
• Enter ISQL01, then click Register, then Close
Creating Tables
• You can’t alter a field once created...
Querying the Database
The DSN
• Go to Control Panel,
ODBC
Finishing the Connection
• When done, test the
source
Visual Interdev
• You’ll want a New Web Project
• You can actually edit the database with a Database Project
Connecting to the Web
Server
Creating the Application
Connecting to the DB
Creating a Connection
Seeing the Data
The Index Page
Add the Record Set
Create a Query for the RS
Create a Grid for the RS
Programming JScript
A bit flaky, semi-object-oriented, somewhat
like Java
Event-driven
No variable declarations
Many HTML objects are reference-able, and
have properties (e.g. visibility, color, etc.)
The DTC’s in Visual Interdev are objects
You can manipulate properties
An Example ASP Page
An example ASP page
See http://grad-pc18/Alon for the files online
We’ll have them at http://isql01 very shortly
For More Help...
Try the online help!
Ask Aung and Alon
Get a book on Jscript, VBScript, ASP, etc.
Look at sample code
http://grad-pc18.cs.washington.edu/Alon