RecordCount
Why is it if I do :
'ASP 3.0
rs.move 0
it display's the first record and not an error message?
Does it set the first record as 0, and move the 2nd record to 1?
Thanks in advanced...
Why is it if I do :
'ASP 3.0
rs.move 0
it display's the first record and not an error message?
Does it set the first record as 0, and move the 2nd record to 1?
Thanks in advanced...
ROB posted this at 14:15 — 24th July 2003.
They have: 447 posts
Joined: Oct 1999
perhaps the index is zero based?
to seek the first record you can use MoveFirst
jlot6 posted this at 15:33 — 24th July 2003.
He has: 9 posts
Joined: Oct 2001
I can understand that, I don't however understand then why if you use recordcount or absoluteposition, is starts from 1?
Suzanne posted this at 18:38 — 24th July 2003.
She has: 5,507 posts
Joined: Feb 2000
My guess is it's so you don't have to correct for the zero position. Oversight?
Record count should be accurate, a count of how many records you have? Absolute position is also logical, it's ABSOLUTELY in the first position, not the zeroth position.
JeevesBond posted this at 21:25 — 24th July 2003.
He has: 3,956 posts
Joined: Jun 2002
ADO is a bit strange with EOF and BOF (you'll find the same happens with EOF).
The AbsolutePosition for BOF is -1, whilst the first record is stored in AbsolutePosition 1 (BOF does not have a record associated with it).
Also...AbsolutePosition is indexed from 1, therefore 0 doesn't really do anything. ADO probably returns the first record becasue it is the nearest match.
a Padded Cell our articles site!
jlot6 posted this at 22:58 — 24th July 2003.
He has: 9 posts
Joined: Oct 2001
Thanks, this helps...
Mark Hensler posted this at 08:41 — 25th July 2003.
He has: 4,048 posts
Joined: Aug 2000
Does this suprise anyone that microsoft has it's own theory on referencing lists? I mean, what were they thinking?!?
JeevesBond posted this at 10:53 — 25th July 2003.
He has: 3,956 posts
Joined: Jun 2002
Hehehe, yeah. I've been programming VB for years, the more I know about it - the less I like it. It's so tempramental, they try to make programming "easy" but just make everything over-complicated and illogical...For web based stuff PHP is the way to go: no COM overhead for a start.
a Padded Cell our articles site!
druagord posted this at 12:27 — 25th July 2003.
He has: 335 posts
Joined: May 2003
they where thinking of the best way to make money doing over complicated things to sell you programming course. then every 3 or 4 years they change everything so you start from 0 again
IF , ELSE , WHILE isn't that what life is all about
Suzanne posted this at 13:00 — 25th July 2003.
She has: 5,507 posts
Joined: Feb 2000
or 1, depending.
druagord posted this at 22:45 — 28th July 2003.
He has: 335 posts
Joined: May 2003
thanks suzanne i should have seen that one
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.