Filling a dataset with randomly chosen records

Filling a dataset with randomly chosen records

Post by SmVubnkgWW » Sun, 29 Aug 2004 08:13:05


I am filling a dataset in VB.NET with randomly chosen records from a table in
an Access Database. I use the following SQL statement that works perfectly
when I test it out in Access. Unfortunately, it does not work the same way
when I use it to configure my dataAdapter in VB.NET

SELECT Problem
FROM tblX
WHERE (Skill = ?)
ORDER By Rnd(ID)

Any ideas?

Thanks,
Jennifer Yellman Quynn
Motivational Assessment
 
 
 

Filling a dataset with randomly chosen records

Post by Van T. Din » Sun, 29 Aug 2004 21:31:49

The Rnd() function is only available if you run the SQL in Access, not from
outside.

Sorry, don't know enough of VB.Net to advise. Suggest you re-post in one of
the VB.Net newsgroups.

--
HTH
Van T. Dinh
MVP (Access)






in
perfectly
way