I'm working on a site that is using a number of small Access
databases and
classic ASP. The option to move to a different database
format is not an
option at present (but I'm working on it).
In the interim, I've been tasked to grab a random text record
from a
database; kind of a "tip of the day (hour, minute,
whatever)". Within Access
I can generate a query that will do this, no probs. However
it seems that
this will not work when run from a web server. (Odd thing is
that the SQL
would work when using the "test" button w/in DW8)
For those interested, the SQL was:
SELECT TOP 1 tblReason2Ride.recNum, tblReason2Ride.ReasonNum,
tblReason2Ride.ReasonText, tblReason2Ride.RidingReason,
tblReason2Ride.ReasonCustomer
FROM tblReason2Ride
ORDER BY Rnd([recNum])*[recNum]*Now()
I also tried
SELECT *
FROM tblFactoids
ORDER BY Rnd([ID])
Within Access, both worked fine. Within Dreamweaver, hitting
the TEST button
w/in the Recordset dialog box also worked. And if I could
move to MS SQL I
could use ORDER BY NEWID()... so, any suggestions on how to
achieve this
w/in ASP would be helpful.