|
ASP - WWW - Database Connections. Example1
What is sever side scripting?
ASP and VB script
Inbuilt objects in Active Server Pages, ASP, for administration of questions and answers in connection with creating and administration of WWW-pages: (see also ASP tutorial. http://www.w3schools.com/asp/default.asp).
- Application - handles status information within apllications
- Session - handles user information at the server during a session
- Request - contains information sent from the browser to the server (e.g. from a form)
- Response - writes information (e.g. HTML code) from the server to the browser
- Server - gives access to server handling functions
- ObjectContext - to start and interupt transactions administered by the Transaction Server
ASP can handle different script languages such as VBScript (Microsoft Visual Basic script) and Java scripts.
Scripts are surrounded by < and >, e.g. < SCRIPT LANGUAGE = VBScript >
Script files may be included
<!-#include virtual=/asp_include_files/table_header.asp >
You can write your own 'If..Then...Else ... End If' statements, Select Case expression, For Next loops, While and Do loops, procedures and functions.
Examples
See also the ASP/html page that procuces the dynamic html-page sent to
the client in example 2 and example 3.
You will find the database used in the examples at http://it.civil.auc.dk/it/education/sem6_1998/exercises/db_normalise.html
Tips
You can debug your ASP-script by placing Response.write statements
at proper places.
Response.Write "output text"
can also be written in short form as
<%= "output text" %>
Now go to the Exercise
Server installations
Windows XP
First install Internet Information Services IIS
- Install Sercice Pack 2 under Windows XP
- Control panel
- Add/remove windows components
- Mark Internet Information Services (IIS) in the Windows Component Wizard
Set up the database connection
- Control Panel
- Perfomance and Maintenance
- Adminsitrative tools
- Data Sources (ODBS)
- System DSN (in the ODBC Data Source Administrator)
- Add
- Driver to Microsoft Access (*.mdb)
- Data Source Name the name of the db
- Select and browse to your database
Windows 2000
- Install Option Pack 4 under Windows NT (Personal Web Server, PWS) and add
Internet Service Manager (ISM) (click 'Custom' during installation and 'Personal Web Server').
- Install Service Pack 4 (or higher) found at
http://www.micorsoft.com/ntserver/nts/downloads/
- Start the Web server by using the Internet Service Manager, ISM.
From 'Programs', 'Windows NT4.0 Option Pack', 'Microsoft personal web server', 'Internet Service Manager' or 'Personal Web Manager'.
- For all users to have access to the data source (a database etc.) establish it as system data source (DSNs Data Source Names) from 'Control Panel', 'ODBC Data Source Admin', 'System DNS', add Microsoft Access Driver (*.mdb).
Select the data source (type .mdb if a database).
References
- ASP tutorial. http://www.w3schools.com/asp/default.asp.
- ActiveX Data Objects (ADO) http://www.w3schools.com/ado/default.asp.
- http://haneng.com/lessons.asp
. Web based learning material. [16.10.2000]
- http://hotwired.lycos.com/webmonkey/programming/asp/. Web based learning material. [16.10.2000]
- http://www.searchDatabase.com/. Further search for ASP material. [16.10.2000]
- http://www.filemekar.com
- http://www.activeserverpages.dk/. Short articles, links. [8.11.2000]
- http://www.asp.dk/artikler.asp?submode=showparent&parent_id=7. Articles. [8.11.2000]
- Easy ASP , HTML/ASP editor with CSS (4.0 Officially Released July 10, 2000), http://www.optweb.net/ebanker/easyasp/
EasyASP is currently a free comprehensive web editor software application, highly developed and comparable to Homesite®. EasyASP is easy to use with 3 packaged programs to aid in your site development. EasyStyle is a style sheet (.css) editor, with a point-click interface that greatly simplifies .css development. EasyData aids developers in setting up databases and connections to their Active Server Pages(ASP) code. EasyFTP is an internal FTP application that allows direct uploads to your website without leaving the EasyASP application. [16.10.2000]
- Wille C, Koller C, 1999, "ASP Active Server Pages". IDG Forlag, Valby. (312 pp.) (http://www.idgforlag.dk).
- Supplement to Christoph Wille, Christian Koller bok "ASP Active Server Pages". http://www.asp24h.com/. [16.10.2000]
- Pedersen S, 2002, "Databasestyrde websider". IDG Forlag, Valby. (87 pp.). [69 DKK].
- "Macomedia Dreamweaver Ultradev 4. Using Dreamweaver Ultradev 4". Macromedia, 2000 (260 pp). [2.2001]
- VBScript User's Guide.
- VBScript Database Tutorial. http://www.asp-help.com/database/db_tutorial1.asp
- Hotwired. Your first database. http://hotwired.lycos.com/webmonkey/backend/databases/tutorials/tutorial3.html
|
|