webmoxter Posted November 10, 2005 Share Posted November 10, 2005 Hello I have sucessfully made a connection of ASP with MYSQL.Is there any replacement to Rs.RecordCount as it is not working in this connection. There is no error returned the value returned is -1.Can any body tell me alternative to that. Link to comment Share on other sites More sharing options...
Jerome Posted November 10, 2005 Share Posted November 10, 2005 You have to change the type of cursor you are using while running trought your recordset... What does this mean? There are diferent ways to navigate throught a recordset. The default property is adOpenForwardOnly and it does'nt allow you use the RecordCount property. So, when openning your recordset, try using this : Recordset.Open sql, con, adOpenStatic and visit the page : http://www.w3schools.com/ado/met_rs_open.asp Link to comment Share on other sites More sharing options...
webmoxter Posted November 11, 2005 Author Share Posted November 11, 2005 But the same script was running before when i have connection with ms access. Link to comment Share on other sites More sharing options...
Jerome Posted November 11, 2005 Share Posted November 11, 2005 ok, but access and mysql are not the same kind of database.Is it running now? Link to comment Share on other sites More sharing options...
kansasprog Posted November 11, 2005 Share Posted November 11, 2005 Hello I have sucessfully made a connection of ASP with MYSQL.Is there any replacement to Rs.RecordCount as it is not working in this connection. There is no error returned the value returned is -1.Can any body tell me alternative to that.<{POST_SNAPBACK}> I would use Rs.Recordcount if its an access or sqlserver databases.. You can loop through your recordset and increment a variable.. to find your total records in that recordset.. while not rs.eof count = count+1 rs.movenextloop Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now