% Set oCon = Server.CreateObject("ADODB.Connection") Set oRS = Server.CreateObject("ADODB.Recordset") sSQL = "SELECT * FROM homepages" conString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath("indexdb\admin.mdb") oCon.Open conString oRS.Open sSQL, oCon, 1, 3 Dim intLowerBound Dim intUpperBound Dim intRangeSize Dim sngRandomValue Dim intRandomInteger 'response.write "oRS.RecordCount = " & oRS.RecordCount intUpperBound = oRS.RecordCount intLowerBound = 1 Randomize() intRangeSize = intUpperBound - intLowerBound + 1 sngRandomValue = intRangeSize * Rnd() sngRandomValue = sngRandomValue + intLowerBound intRandomInteger = Int(sngRandomValue) oRS.Close sSQL = "SELECT content FROM homepages WHERE id = " & intRandomInteger oRS.Open sSQL, oCon dispText = oRS("content") %>