<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=sökväg till databasen"
SQL = "Select * FROM citat"
RStemp = UBOUND(oConn.Execute(SQL).GetRows(),2)+1
Randomize
post = Int(RND*RStemp)
Set RS = oConn.Execute(SQL)
For s = 1 to post
RS.MoveNext
Next
%>
<% =RS("Citat") %>
<% Rs.Close
Set Rs = Nothing %>
ok, nu har jag gjort databasen med de olika kolumnerna...
ska jag bara avnända att ta fram dom då lr??
<%
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=sökväg till databasen"
SQL = "Select * FROM citat"
RStemp = UBOUND(oConn.Execute(SQL).GetRows(),2)+1
Randomize
post = Int(RND*RStemp)
Set RS = oConn.Execute(SQL)
For s = 1 to post
RS.MoveNext
Next
%>
<% =RS("Citat") %>
<% Rs.Close
Set Rs = Nothing %>