Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

RecordSet.MoveFirst

Status
Not open for further replies.

CandieCane

Programmer
Apr 9, 2002
25
US
Hello everyone,
When I use this, it doesn't seem to take me to my first record in the my table, does anyone know how to forcefully get to the first record of a table without hardcoding?

Thanks! Candie ;o)

"Mere distances between 2 people bring you all that much closer in the end!"
 
Hi there,

What is the actual code you are using in your ASP page?

M
 
Hello!
Here is an excerpt on the part that I'm currently working on. There's 4 records in TBL_TEAM starting at ID_TEAM = 0. My goal is to initialize teamNumber to the first ID_TEAM record for that league.

In this case, the first ID_TEAM = 0 but ID_TEAM is being returned as 3. How do we get it to return ID_TEAM = 0?

Dim sql1
sql1 = "SELECT * FROM TBL_TEAM WHERE ID_LEAGUE=" & Session( "LeagueType" ) & ""

rs.MoveFirst

Dim teamNumber
teamNumber = rs.fieldvalue("ID_TEAM") Candie ;o)

"Mere distances between 2 people bring you all that much closer in the end!"
 
Hi CandieCane,

Have you tried putting () after your rs.movefirst? This may help. Try it and get back to us.

M "There are 3 kinds of people; those that can count and those that can't"
 
Hey,
It's still returning ID_TEAM = 3!! ;o( Candie ;o)

"Mere distances between 2 people bring you all that much closer in the end!"
 
Figured it out on my own. Thanks for ur help! Candie ;o)

"Mere distances between 2 people bring you all that much closer in the end!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top