Hi I'm trying to pull a random record from an access database. I'm using ASP and dreamweaver. Here is the code that I have generated:
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_MVTP_STRING
Recordset1.Source = "SELECT * FROM qryRandom"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
I tried putting the Rnd() function in the query in the database but that does not seem to work...
Any help would be greatly appreciated in what i should do...
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_MVTP_STRING
Recordset1.Source = "SELECT * FROM qryRandom"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
I tried putting the Rnd() function in the query in the database but that does not seem to work...
Any help would be greatly appreciated in what i should do...