Basic HTML version of Foils prepared July 5 98

Foil 10 ASP - Example Code I

From FMS: Forces Modeling and Simulation Handout JSU HPC Summer Institute for Undergraduates, Jackson MS -- June 15 1998. by Wojtek Furmanski, Subhash Nair, Tom Pulikal


1 <!-- #Include file="utils.asp" --> <!--include file containing some variable declarations-->
2 <!-- The file that lists the classes in the left frame // sp_classes_list.asp --->
3 <html>
4 <head><title>Speedes Database - sp_classes_table Table List</title></head>
5 <body bgcolor="#ffffff">
6 <%
7 Dim selid, clsid
8 selid = request.querystring("id") 'get the id from the querystring
9 if(selid = "") then
10 selid = 1
11 end if
12 ` open up a database connection and execute the SQL query
13 Set OBJdbConnection = Server.CreateObject("ADODB.Connection")
14 OBJdbConnection.Open "speedes"
15 ` select id and name of all classes from the classes table
16 SQLQuery = "SELECT clsid,cname FROM sp_classes_table"
17 `execute the SQL query and get the resultset
18 Set typelist = OBJdbConnection.Execute(SQLQuery)
19 %>

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998