database queries in vb.net
I'm trying, unsucessfully mind you, to implement something that does the following in vb.net, connected to an access database this is my kind of (part psudo) code. any ideas about how i get this to work?
Code:
dim count as integer
dim r as integer
dim entrySel as arraylist
dim dbsize as double
count = 0
dbsize = result of "select count from table"
while count < dbsize
r = int(rnd()*dbsize)
if entrysel.contains(r)=false
then
entrysel.add(r)
use "select * from table where id = 'r' "
and add this result to the datagrid/dataset
count++
end if
end while
or something like that, basically capable of the same thing. select a user specified number of items from a database at random, with no repettionn.
(Sorry my spelling is so bad today)
thanks in advance