Selecting Random Row from MS Access table

October 27, 2010 at 7:57 am Leave a comment

set rs=server.CreateObject(“ADODB.recordset”)

rs.Open “select quotes from quotes”,connObj,3,3

Randomize()

intRangeSize = rs.recordcount – 1 + 1

sngRandomValue = intRangeSize * Rnd()

intRandomInteger = Int(sngRandomValue)

for i=1 to intRandomInteger

rs.movenext

next

response.write rs(“quote”)

If you want to know more about <a href=http://qualitypoint.blogspot.com/2010/03/selecting-random-row-from-ms-access.html>Selecting Random Row from MS Access table click here.</>

Advertisements

Entry filed under: Software.

eBook for learning Software Testing and QTP Synchronous execution of .exe file from VC++ application

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Tweets

October 2010
M T W T F S S
« Sep   Nov »
 123
45678910
11121314151617
18192021222324
25262728293031

Blog Stats

  • 26,986 hits

QualityPoint on Twitter


%d bloggers like this: