![]() |
MS Access Query: Returning a random row problem
I have a C# application that I am writing but everytime it runs the query it only returns the very first row. Any ideas what I am doing wrong?
Code:
private void pickWinnerToolStripMenuItem_Click(object sender, EventArgs e) |
Re: MS Access Query: Returning a random row problem
TOP 1 means it will return the Top Row which is why its returning only one ROW.
|
Re: MS Access Query: Returning a random row problem
Yes I only want 1 row, but I don't want it to always be the very first row in the database, I want it to be only 1 random row.
|
Re: MS Access Query: Returning a random row problem
Your random is not really random. See for multiple run and check whats the value of the seed.
Random rand = new Random(); int seed = rand.Next(); |
| All times are GMT +5.5. The time now is 11:47. |