-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathloadBodyData.asp
55 lines (46 loc) · 1.54 KB
/
loadBodyData.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<%
response.expires=-1
'convert the text string into a number
UT = int(request.querystring("ut") * 1)
'open catalog database. "db" was prepended because without it for some reason I had trouble connecting
db = "..\..\database\dbCatalog.mdb"
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
sConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & server.mappath(db) &";" & _
"Persist Security Info=False"
conn.Open(sConnection)
'create and open the tables
set rsMoons = Server.CreateObject("ADODB.recordset")
set rsPlanets = Server.CreateObject("ADODB.recordset")
rsPlanets.open "select * from Planets", conn, 1, 1
rsMoons.open "select * from Moons", conn, 1, 1
do
'output the record in name/value pairs for each field
record = ""
for each field in rsPlanets.fields
record = record & replace(field.name, " ", "") & "~" & field.value & "`"
next
'get rid of the last semicolon and ouput
record = left(record, len(record)-1)
record = record & "|"
response.write record
'advance the recordset point and repeat
rsPlanets.movenext
loop until rsPlanets.eof
do
'output the record in name/value pairs for each field
record = ""
for each field in rsMoons.fields
record = record & replace(field.name, " ", "") & "~" & field.value & "`"
next
'get rid of the last semicolon and ouput
record = left(record, len(record)-1)
record = record & "|"
response.write record
'advance the recordset point and repeat
rsMoons.movenext
loop until rsMoons.eof
conn.Close
Set conn = nothing
%>