Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Reply
 
LinkBack Thread Tools Display Modes
Old 03-05-2010, 12:34 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: May 2010
Posts: 10
Default vb random record selection


i use ms access as back side of application.
and front side is visual basic.
i want to get random record from access table to visual basic form for online examination software.


please send answer as soon as



thanking for cooperation
jaiminardeshna is offline   Reply With Quote
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 22-08-2010, 09:58 PM   #2 (permalink)
XLr8
 
arpanmukherjee1's Avatar
 
Join Date: Sep 2008
Posts: 637
Default Re: vb random record selection

Code:
Private Sub PrintRows(dataSet As DataSet)
     Dim thisTable As DataTable
     For Each thisTable In  dataSet.Tables
         Dim row As DataRow
         For Each row In  thisTable.Rows
             Dim column As DataColumn
             For Each column In  thisTable.Columns
                 Console.WriteLine(row(column))
             Next column
         Next row
     Next thisTable
End Sub

'Use this "rval" as "row(rval)" and set
'upperbound = thisTable.Rows.Count
'lowerbound = 1
rval = CInt(Int((upperbound - lowerbound + 1) * Rnd() + lowerbound))
__________________
Quote:
There are more things in heaven and earth, Horatio,
Than are dreamt of in your philosophy.
arpanmukherjee1 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GPRS selection scavanger007 Mobiles and Tablets 20 21-04-2010 08:56 AM
How to Record Voice of a adjacent Room with Bluetooth enabled peripherals & Mobile jbohaj Mobiles and Tablets 2 16-04-2010 11:22 AM
Need advice on Mobo selection ojha_riddhish Hardware Q&A 8 01-04-2010 08:52 AM
PC Freezes At random intervals rhasta Software Q&A 7 15-03-2010 02:47 PM
Due Kernel I/O error, system refuses to boot randomly gary4gar Open Source 33 04-05-2008 10:22 AM

 
Latest Threads
- by Charan
- by Charan
- by clmlbx

Advertisement




All times are GMT +5.5. The time now is 03:17 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2