Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 18th, 2005, 08:10 PM
Registered User
 
Join Date: Aug 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It would be much easier to let the DB handle the processing of the random field by using the following TSQL:

SELECT TOP 1 Field1, Field2
FROM myTable
ORDER BY NewID()

Hope this help someone.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Random record from objRS - why is EOF or BOF True? jfrizelle Classic ASP Databases 0 February 5th, 2008 07:24 AM
Copy previous field record if next field is null ecampos Access VBA 6 June 23rd, 2006 12:55 PM
Flagging a Random Record ptleitch SQL Server ASP 0 April 3rd, 2006 09:58 AM
Display a random record for 24 hours palvin SQL Language 6 February 6th, 2006 10:36 AM
display random record from access database jialin PHP Databases 1 December 2nd, 2005 09:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.