|
| |
|
|
Giomanach
Posts: 6136 Joined: 11/19/2003 From: England Status: offline
|
2 Questions - 3/8/2005 15:04:48
Question 1: <% strSQL = "Select * FROM users" Set RS = Server.CreateObject("ADODB.Recordset") RS.Open strSQL, MyDSN NoRecords = RS.RecordCount %> Returns -1, it's counting the wrong way...how do I get it to count up. Question 2: Random records - how to do? Currently re-working an abandoned project (you know, those clients who bugger orf without saying anything), and I want to add a random quote bit to it. All DB reliant. TIA Dan
_____________________________
|
|
|
|
dzirkelb1
Posts: 1321 Joined: 10/5/2004 From: Cedar Rapids, Iowa Status: offline
|
RE: 2 Questions - 3/8/2005 15:08:53
A quick guess on the random one...depending on how many quotes you have, you could pull the current time and have the seconds be the randomizer....then, have simple sql query to be select quote from table where quoteid="&second&" or something basic like that...unsure if that is what you are looking for though, but could pose as a quick fix it :)
|
|
|
|
rdouglass
Posts: 9280 From: Biddeford, ME USA Status: offline
|
RE: 2 Questions - 3/8/2005 15:31:13
quote:
Returns -1 Try it this way: <% strSQL = "Select * FROM users" Set RS = Server.CreateObject("ADODB.Recordset") RS.Open strSQL, MyDSN RS.MoveLast NoRecords = RS.RecordCount %> As to random record, this might help: http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=65
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
Giomanach
Posts: 6136 Joined: 11/19/2003 From: England Status: offline
|
RE: 2 Questions - 3/8/2005 17:59:22
quote:
RS.MoveLast Returns: Microsoft JET Database Engine (0x80040E24) Rowset does not support fetching backward. /portal/ASP/includes/common.inc, line 41 I'll get back to you on the randomness
_____________________________
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|