|
-
Apr 27th, 2005, 07:06 PM
#1
Thread Starter
Hyperactive Member
Record Set .RecordCount
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT * FROM pics"
rs.Open sql,objConn
response.write(rs.Fields("picture").Value)
i=rs.RecordCount
response.write("The number of records is: " & i)
rs.Close
what is wrong with the code above im am useing to get the number of records.
i want it to write 1 b/c there is one record in the table.
the SQL is defiantly right b/c response.write(rs.Fields("picture").Value) write out the value of the one thng in the database
but RecordCount is giveing me -1 why is this???
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|