ASP - Active server page source code
Active server page source code
[1] How to get(return) a random record -- Microsoft SQL Server To return a random record from a resultset we append a random, unique, value to each record. We order the resultset by these random values, and use SQL's TOP clause to restrict the number of records coming back into our ADO recordset.

Microsoft SQL Server
For Microsoft SQL Server we use the NewId() function to return values of data type unique indentifier. These are similar to Window .....
[2] How to return a random record -- Microsoft Access To return a random record from a resultset we append a random, unique, value to each record. We order the resultset by these random values, and use SQL's TOP clause to restrict the number of records coming back into our ADO recordset.

Microsoft Access
For Microsoft Access we can return a set of one or more random records by using the RND() function to order the resultset. The only di .....
[3] Selecting a random record <%@ Language="VBScript" %>
<% Option Explicit %>
<html>
<head>
<title>Selecting a random record</title>
</head>
<body>
<%
'declare your variables
dim connection, recordset, sConnString, sql
dim intRandomNumber, intTotalRecords, i

'declare SQL statement that will query your database
sql = "SELECT * FROM tblASPData"

' .....
Javascript Source List :