/    Sign up×
Community /Pin to ProfileBookmark

Display a random record from a database

Hi,
I have an Access database with names, addresses and emails of contestants in it.
I want to be able to click on a button(ASP page) and display a winning name from the database. This must be random.

I have the asp page done with the button. I need the Javascript to randomize the record for me
I will then use ASP to show the name, address and email of the winner.

Thanks for any help you can give me.

p.s. database fileds are (ID, name, address, province, phone, email and age)

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@buntineFeb 01.2004 — Ok, first of all, let me understand exactly what you want to do.

Tell me if this is correct.

You want to select all the records from an Access database and then use Javascript to randomly select one record?
Copy linkTweet thisAlerts:
@gailmbakerauthorFeb 01.2004 — That's right,

I want to pick a random record from trhe Access database.

I will display that record on the page as the winner.
×

Success!

Help @gailmbaker spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...