%@ Language=VBScript %><% option explicit %>
Rainer's research on evolution, skills, and language comprehension
<%
DIM ScreenWidth, ScreenHeight
DIM timeout
DIM gen_parent, gen_child
DIM x1, x2 'horizontal
DIM y1, y2 'vertical
DIM msg '-- for errors
DIM CS_1 'Connection String
DIM RS_0, Q_0, SID 'RecordSet, Query - for sessionID
DIM RS_1, RS_2, RS_3, RS_4, RS_5 'RecordSet
DIM Q_1, Q_2, Q_3, Q_4, Q_5 'SQL query against the db
DIM RWline1, RWline2, RWline3
DIM action
DIM choice_1
DIM nCount, count, count1, max_a, max_b, min_a, min_b, diff_a, diff_b
DIM popCount
DIM att_a, att_b
'' extend the timeout to allow for long files
timeout = Server.ScriptTimeout
'' Response.Write "Initial timeout=" & timeout & "
"
Server.ScriptTimeout = 1200
ScreenWidth = Request.Cookies("Humble")("ScreenWidth")
ScreenHeight = Request.Cookies("Humble")("ScreenHeight")
CS_1 = "DSN=evolve"
gen_parent = 1
gen_child = 2
'-- ur-pop table with attribute data
Q_0 = "SELECT * FROM gen_0"
' Response.Write Q_0 & "
"
SET RS_0 = Server.CreateObject("ADODB.Recordset")
RS_0.Open Q_0, CS_1, adOpenKeySet, adLockPessimistic, adCmdText
IF RS_0.EOF THEN
msg = " *** no data gen_1 *** "
ELSE
nCount = RS_0.RecordCount
END IF
' ---- need to copy to the initial parent generation and to gen_2 ----
'-- set up gen_1 table with attribute data, assume single copy
Q_1 = "SELECT * FROM gen_" & gen_parent
SET RS_1 = Server.CreateObject("ADODB.Recordset")
RS_1.Open Q_1, CS_1, adOpenKeySet, adLockPessimistic, adCmdText
IF NOT RS_1.EOF THEN
RS_1.MoveFirst
END IF
'-- set up gen_2 table with attribute data, assume single copy
Q_2 = "SELECT * FROM gen_2"
SET RS_2 = Server.CreateObject("ADODB.Recordset")
RS_2.Open Q_2, CS_1, adOpenKeySet, adLockPessimistic, adCmdText
IF NOT RS_2.EOF THEN
RS_2.MoveFirst
END IF
RS_0.MoveFirst
DO UNTIL RS_0.EOF
att_a = RS_0.Fields("A")
RS_1.Fields("A") = att_a
RS_2.Fields("A") = att_a
att_b = RS_0.Fields("B")
RS_1.Fields("B") = att_b
RS_2.Fields("B") = att_b
RS_1.Fields("nCopy") = 99
RS_1.Fields("dist") = 99
RS_1.Fields("dist_sel") = 99
RS_1.Update
RS_2.Update
RS_1.MoveNext
RS_2.MoveNext
RS_0.MoveNext
LOOP
Response.Redirect "toc_top.htm"
'' reset the timeout
Server.ScriptTimeout = timeout
Response.End '-----------------------------------------------------------%>