Re: Creating a dataset filled with random records
From: Steven Bras (sbras(delete)_at_cablespeed.com)
Date: 08/28/04
- Next message: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Previous message: Jenny Yellman: "Creating a dataset filled with random records"
- In reply to: Jenny Yellman: "Creating a dataset filled with random records"
- Next in thread: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Reply: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 21:03:14 -0700
The problem is most likely due to the fact that the Rnd(ID) function call is
not working properly under VB.Net, whereas it does when run in Access.
Functions such as Rnd() do not work when called from JetOLEDB or ODBC as
they do in Access, and the query usually needs to be written in a way to
accommodate this. Typically, you would evaluate Rnd(ID) in VB.Net, and pass
the value of that expression explicitly to the query.
This is because the Jet providers are not able to execute the same
VB-specific function calls that Access itself can. The safest bet is to
stick with pure ANSI SQL-compliant queries.
Hope this helps.
"Jenny Yellman" <jaquynn@ihmail.com.donotspam> wrote in message
news:94C908CB-0273-4B5A-B911-3FB1E0450823@microsoft.com...
> I am using VB.NET and creating a dataset that is filled randomly with
records
> from a table in Access.
>
> The following statement does just what I would like when I test it in
> Access. It does not do the same when I use it to configure my dataAdapter
in
> VB.NET.
>
> SELECT Problem
> FROM tblX
> WHERE (Skill = ?)
> ORDER By Rnd(ID)
>
> Thanks for the help,
>
> --
> Jennifer Yellman Quynn
> Motivational Assessment
- Next message: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Previous message: Jenny Yellman: "Creating a dataset filled with random records"
- In reply to: Jenny Yellman: "Creating a dataset filled with random records"
- Next in thread: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Reply: Jenny Yellman: "Re: Creating a dataset filled with random records"
- Messages sorted by: [ date ] [ thread ]