List:General Discussion« Previous MessageNext Message »
From:Ayende Rahien Date:September 10 2000 12:47pm
Subject:Problem with RecordCount with ASP & MySQL
View as plain text  
I'm trying to use recordcount to find out how many records there are in a
recordset.
I'm getting recordcount = -1
I've encountered this problem before in a Access Database, and successfully
solved it.
The problem was the cursortype, once that was corrected, everything worked
fine.
Unfortantely, this does not work for MySQL.
Can you please help me figure out what I'm doing wrong?

Here is the code I'm using:
___________
<%
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open
"Driver=MySQL;Server=localhost;UID=username;PWD=password;Port=3306;"
Set RS = Server.CreateObject("ADODB.RecordSet")
RS.CursorType = 3
RS.ActiveConnection = Conn
Conn.Execute "Use mysql;"
RS.Open "Select * from user;"
Response.Write RS.RecordCount
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
%>
__________

Second question, how do I find out, in a SQL command, what are the user's
privilages are?
--
All we have of freedom, all we use or know--
This our fathers bought for us long and long ago.

Ancient Right unnoticed as the breath we draw--
Leave to live by no man's leave, underneath the Law.
________
Ayende Rahien


Thread
Problem with RecordCount with ASP & MySQLAyende Rahien10 Sep
  • Re: Problem with RecordCount with ASP & MySQLJames Treworgy10 Sep
    • Re: Problem with RecordCount with ASP & MySQLChristopher R. Jones10 Sep
      • Re: Problem with RecordCount with ASP & MySQLJames Treworgy10 Sep
Re: Problem with RecordCount with ASP & MySQLDaniel C BAUFAY10 Sep
  • Re: Problem with RecordCount with ASP & MySQLJames Treworgy10 Sep
Re: Problem with RecordCount with ASP & MySQLDaniel C BAUFAY10 Sep
Re: Problem with RecordCount with ASP & MySQLDaniel C BAUFAY10 Sep
Re: Problem with RecordCount with ASP & MySQLDaniel C BAUFAY10 Sep