As has been established, this is an artifact of Access using the same "seed" for each new connection.
"ACC: How to Fill a Table with Random Records from Another Table" (ID: Q170986) states: "However, there is a disadvantage to this method. When you start Microsoft Access and run the query, a particular set of records is returned, which can be referred to as "Recordset A." You may run the query several more times with different results, and then quit Microsoft Access. The next time you start Microsoft Access and run the query, the result is again Recordset A." It proceeds to provide a solution that appears rather worthless (at least at first glance). However, it indicates that you can't use the Access RND() function, but must rather implement a random sort in your app. HTH, Tore. -----Original Message----- From: Ken Schaefer [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 9:07 PM To: ActiveServerPages Subject: Jet Problem My turn to ask a question :-) I posted this to microsoft.public.inetserver.asp.db, but so far no takers: ------------------------------------------------------------ Hi, I seem to have a Jet caching problem. The following query, when run inside Access does what it's supposed to do: SELECT Table1ID, Table1Field1 RND(Table1ID) FROM Table1 ORDER BY 3 (it randomly orders the records each time you run it). However, if I use Jet.OLEDB.4.0 to connect to the database and run the same query from an ASP page, I get the same results-set each time (refresh the page, and the results-set is ordered exactly the same, with the same "random" values). If I run the SQL statement *twice* on a page, then I get two different results-sets, BUT, if I refresh the page I get the same two different results-sets. This happens regardless of whether I cache ISAPI applications, restart IIS or reboot the machine. If I put the SQL into a query and store it inside Access and call from an ASP page, I get the same behaviour. Somewhere Jet (or the provider) seems to be caching the output of the query and re-using it, but I can't seem to work out what I can change to get it to stop. I've looked through all the dynamic properties of the connection object and recordset object (and command object), but I can't seem to see anything that is relevant... Any thoughts? Cheers Ken --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
