|
J
|
Jane 3/2/2007 |
|
Bob, Sub ListOnLoad() str = "select * from " & strTableName &" order by TimeField asc" Set rsTemp = server.CreateObject("ADODB.Recordset") rsTemp.open str, dbConnection ii=1 while not rsTemp.eof strUpdate = "update " & strTableName & " set RankField=" & ii & " where IDField="&rsTemp("IDField") dbConnection.Execute strUpdate ii = ii+1 rsTemp.movenext wend rsTemp.Close : set rsTemp = Nothing End Sub |
|
|
G
|
grinningdog author 3/2/2007 |
|
Actually that answers another question (which I would have got to <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=15951&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' /> ) but... doesn't it just list the infomation in a specific order? |
|
|
|
Sergey Kornilov admin 3/2/2007 |
|
The code that Jane posted updates field named RankField with correct value everytime List Page is loaded. |
|
|
G
|
grinningdog author 3/2/2007 |
|
Excellent. Thanks for the clarification. I was obviously confused by "order by TimeField asc" and didn't think it through. |
|
|
G
|
grinningdog author 3/5/2007 |
|
Hi Jane " where IDField="&rsTemp("IDField")
|
|
|
|
Sergey Kornilov admin 3/5/2007 |
|
In this example IDField is the name of ID field in your table. |
|
|
G
|
grinningdog author 3/5/2007 |
|
Yep, that's what I thought. Sub ListOnLoad()
|
|
|
|
Sergey Kornilov admin 3/5/2007 |
|
Don't replace strTableName with strTblIndividual. |
|