Thread: random
View Single Post
  #5 (permalink)  
Old Jul 18th, 2005, 01:42
benbramz benbramz is offline
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
ha! lol never saw that post 5 from the top

however, im stuck. basicly im editing a script i downloaded. its the page that shows all the entries of the database. However, im not sure where or what to edit to make the RND function work.

Code: Select all
  <%
  dim Connect, SHOWALL, Query 
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("db.mdb"))
Set SHOWALL = Server.CreateObject("ADODB.Recordset")
Query = "SELECT * FROM records"
SHOWALL.Open Query, Connect, adOpenDynamic, adLockOptimistic
SHOWALL.movefirst
do while not SHOWALL.eof
%>
how do i edit this? and whats the basic connection to the db, cos i know some of that is extra, just dont know what.
(is it this?)
Code: Select all
  <%
  dim Connect, SHOWALL, Query 
Set Connect = Server.CreateObject("ADODB.Connection")
Connect.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & server.MapPath("db.mdb"))
Query = "SELECT * FROM whatever"
%>
with regards
Reply With Quote