|
-
March 17th, 2003, 11:53 AM
#1
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
Last edited by xeviva; March 17th, 2003 at 12:02 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|