>While I have no experience with OleDb, in Visual FoxPro you need to initialize the random number sequence, with a negative seed. For example:
>
>
>rand(-1)
>for i = 1 to 100
> ? rand()
>next
>
>
>Omiting the first step will always produce the same sequence (if you restart Visual FoxPro in between, or convert it to an executable).
>
>I don't know what would be the best way to invoke this in your situation.
That's the problem. In OleDb, each call is within in its own environment. Thus, that's why it always gives the same result. I don't know how to adjust the SQL so within it, such command could be invoked.