Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Show random data or image using ASP
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Show random data or image using ASP

 Post Reply Post Reply
Author
Andy Rowland View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2004
Location: London
Status: Offline
Points: 86
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy Rowland Quote  Post ReplyReply Direct Link To This Post Topic: Show random data or image using ASP
    Posted: 07 October 2008 at 4:13pm
Using Dreamweaver, asp and Access. How can I show random images taken from an Access database using SELECT, FROM, WHERE, ORDER etc.
Thanks.
Who the hell is calling at this time?
Back to Top
mhanif View Drop Down
Groupie
Groupie
Avatar

Joined: 22 November 2007
Location: Pakistan
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhanif Quote  Post ReplyReply Direct Link To This Post Posted: 12 October 2008 at 12:44am

Tell me more about it, what exactly do you want or show the url where u have seen something like that.

If its only image you want to show randomly then u don't need MS Access , you can read from folders also.
 
One more advice, if you are not addictive to dreamweaver then switch to MS Frontpage or its latest version Expression Web. Because when you are into ASP , I think Frontpage is best.
 
Do reply, i will see what i can do.
Back to Top
Andy Rowland View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2004
Location: London
Status: Offline
Points: 86
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy Rowland Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2008 at 9:33am

The site I have designed has lists of Bars and clubs with descriptions and locations etc. The information is stored on an Access database and is added on-line by admin staff and registered users. The Bars info is shown on the bars page etc.. I need to show random bar and club information on the main page each time the page loads.

As you can see from the link. The main page shows the latest bars/clubs info that has been added. I also want to show random bars and clubs.
 
Thanks
Who the hell is calling at this time?
Back to Top
mhanif View Drop Down
Groupie
Groupie
Avatar

Joined: 22 November 2007
Location: Pakistan
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhanif Quote  Post ReplyReply Direct Link To This Post Posted: 13 October 2008 at 5:07pm

Ok i am checking it out, let me see if i can help you with this.

Back to Top
mhanif View Drop Down
Groupie
Groupie
Avatar

Joined: 22 November 2007
Location: Pakistan
Status: Offline
Points: 52
Post Options Post Options   Thanks (0) Thanks(0)   Quote mhanif Quote  Post ReplyReply Direct Link To This Post Posted: 16 October 2008 at 8:56am
Check your PM, i have sent url of ramdom image script. hope that helps. tc
Back to Top
alabamatoy View Drop Down
Groupie
Groupie


Joined: 04 February 2006
Location: United States
Status: Offline
Points: 143
Post Options Post Options   Thanks (0) Thanks(0)   Quote alabamatoy Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2008 at 1:30am
Microsoft has a freebie, see: http://support.microsoft.com/kb/247745
Back to Top
Andy Rowland View Drop Down
Groupie
Groupie
Avatar

Joined: 13 July 2004
Location: London
Status: Offline
Points: 86
Post Options Post Options   Thanks (0) Thanks(0)   Quote Andy Rowland Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2008 at 8:25am
I think you are all missing the point. I don't want to show random images. I want to read and show random text data from an Access database.
It's information about bars and clubs. I want it to show information at random, each time the page is opened.


Edited by Andy Rowland - 17 October 2008 at 8:29am
Who the hell is calling at this time?
Back to Top
Scotty32 View Drop Down
Moderator Group
Moderator Group


Joined: 30 November 2002
Location: Manchester, UK
Status: Offline
Points: 1682
Post Options Post Options   Thanks (0) Thanks(0)   Quote Scotty32 Quote  Post ReplyReply Direct Link To This Post Posted: 17 October 2008 at 11:51am
If you search Google you will find many websites with tutorials answering your question. ('4 Guys From Rolla' springs to mind from when I did the same search a few years ago)

Access makes things a bit more difficult as there is no direct way of doing it.

One of the methods I have spotted on the web are getting the number of records you have and picking a number at random and load record whos ID is that number.

This would became a problem if you have deleted a few records as it may pick a number where the record with that ID has been deleted - which means it wont display anything.



With MSSQL you can just do "Order By NEWID()" and it will pick a record at random. For this and many other reasons, I would recommend moving to MSSQL.
S2H.co.uk - WebWiz Mods and Skins

For support on my mods + skins, please use my forum.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.