'Deklarera variabler
Dim bColor 'b = Boolean
bColor = true
'Låtsas connection
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "dsn","uid","pwd"
sSql = "SELECT kolumn1, kolumn2 FROM tabell"
Set oRs = Server.CreateObject("ADODB.Recordset")
oRs.Open sSql, oConn
'Här kommer det, TADA!
Do While Not oRs.EOF
If bColor Then
Response.Write(" ")" & oRs("kolumn1") & " " & oRs("kolumn2") & "
bColor = false
Else
Response.Write(" ")" & oRs("kolumn1") & " " & oRs("kolumn2") & "
bColor = true
End If
oRs.MoveNext
Loop
'ALLTSÅ
Dim bColor
bColor = true
If bColor Then
VIT
bColor = false
Else
GRÅ
bColor = true
End If