Skip to content

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!

 

Kevin Liang
CTO / SEO Guru
Canadian Web Hosting
http://www.canadianwebhosting.com/

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *