ASP Recordcount with MySQL database

I was trying to use the Recordcount in asp with MySQL and always came up with -1.  It took me sometime finding a solution. Apparently MySQL does not support Server Side Cursors. Here is a quick fix:

To make this work you will need to set the CursorLocation to 3:

Set objRS = Server.CreateObject(”ADODB.Recordset”)
objRS.CursorLocation = 3
objRS.Open mySQL, objConn

Hope this helps!

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • Digg
  • Furl
  • Reddit
  • StumbleUpon
  • Technorati

Leave a Reply

You must be logged in to post a comment.