Ask a Question related to ASP Database, Design and Development.
-
Roy Danon #1
rs.Recordcount isn't working with mySQL
Hi,
I'm using a recordset object to open a sql statement(select * from
tablename)
and for some reason the rs.recordcount value is always 0.
and I know there are above 20 records in this table
is any1 familiar with this problem and knows how to solve it?
Roy.
Roy Danon Guest
-
#38842 [Com]: PDO nextRowset not working on MySQL
ID: 38842 Comment by: mike at we11er dot co dot uk Reported By: stochnagara at hotmail dot com Status: Open... -
MySQL Query Cache Not Working: MySQL 5 / Windows XP
Please excuse this post if you've already read it on mailing.database.mysql - i just discovered these other groups. future posts will be... -
insert blob in MySQL (CF_SQL_BLOB) not working
I've read the post about "insert blob in oracle (CF_SQL_BLOB) not working" and followed the solution. The only difference here is that I am dealing... -
[PHP] RH9.0: Upgrade to 4.3, mysql functions not working
"undefined function mysql_select". mysql_select by itself isn't a function. Are you using other code to define this function? Or are you just... -
RH9.0: Upgrade to 4.3, mysql functions not working
Hi Folks, I've got a (in my eyes) very strange behaviour from my RedHat Linux 9.0 box. I needed to upgrade my PHP version to 4.3, since that's... -
Manohar Kamath [MVP] #2
Re: rs.Recordcount isn't working with mySQL
[url]http://www.aspfaq.com/show.asp?id=2193[/url]
Perhaps that could help?
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Roy Danon" <admin@droyd.net> wrote in message
news:btov19$5c3$1@news2.netvision.net.il...> Hi,
> I'm using a recordset object to open a sql statement(select * from
> tablename)
> and for some reason the rs.recordcount value is always 0.
> and I know there are above 20 records in this table
>
> is any1 familiar with this problem and knows how to solve it?
>
> Roy.
>
>
Manohar Kamath [MVP] Guest
-
Roy Danon #3
Re: rs.Recordcount isn't working with mySQL
Thanks for the reply,
but it doesn't help..
the first solution is the same as what i'm doin
the second is only for getrows which i don't always use
and the third is for MSSQL...
any other answers?
Roy.
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:eq9qUX51DHA.484@TK2MSFTNGP10.phx.gbl...> [url]http://www.aspfaq.com/show.asp?id=2193[/url]
>
> Perhaps that could help?
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Roy Danon" <admin@droyd.net> wrote in message
> news:btov19$5c3$1@news2.netvision.net.il...>> > Hi,
> > I'm using a recordset object to open a sql statement(select * from
> > tablename)
> > and for some reason the rs.recordcount value is always 0.
> > and I know there are above 20 records in this table
> >
> > is any1 familiar with this problem and knows how to solve it?
> >
> > Roy.
> >
> >
>
Roy Danon Guest
-
Aaron Bertrand [MVP] #4
Re: rs.Recordcount isn't working with mySQL
> the first solution is the same as what i'm doin
How do we know that? SHOW YOUR CODE.
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand [MVP] Guest
-
Roy Danon #5
Re: rs.Recordcount isn't working with mySQL
Here you go :)
set rsNewsQuick=server.CreateObject("ADODB.recordset")
sqlNews="SELECT * FROM QuickNews order by id desc"
rsNewsQuick.Open sqlNews,dsn,1,1
Thanks,
Roy.
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:Oh80bR%231DHA.4064@tk2msftngp13.phx.gbl...>> > the first solution is the same as what i'm doin
> How do we know that? SHOW YOUR CODE.
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
Roy Danon Guest
-
Aaron Bertrand [MVP] #6
Re: rs.Recordcount isn't working with mySQL
And which driver are you using to connect to mySQL? Have you consulted its
documentation to see whether it even supports recordcount? If it does not,
have you tried any other driver(s)?
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Roy Danon" <admin@droyd.net> wrote in message
news:btre0k$735$1@news2.netvision.net.il...> Here you go :)
>
> set rsNewsQuick=server.CreateObject("ADODB.recordset")
> sqlNews="SELECT * FROM QuickNews order by id desc"
> rsNewsQuick.Open sqlNews,dsn,1,1
>
>
> Thanks,
> Roy.
>
> "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> news:Oh80bR%231DHA.4064@tk2msftngp13.phx.gbl...>> >> > > the first solution is the same as what i'm doin
> > How do we know that? SHOW YOUR CODE.
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > [url]http://www.aspfaq.com/[/url]
> >
> >
>
Aaron Bertrand [MVP] Guest
-
Roy Danon #7
Re: rs.Recordcount isn't working with mySQL
Hi,
I'm using the driver my hosting service adviced me to use :
"Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Port=3306; Option=0;
Socket=; Stmt=; Database=xxx_xxx; UID=xxx_xxx; PWD=xxx;"
where can i find it's documention?
Roy.
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:OByO3zE2DHA.1264@TK2MSFTNGP11.phx.gbl...its> And which driver are you using to connect to mySQL? Have you consultednot,> documentation to see whether it even supports recordcount? If it does> have you tried any other driver(s)?
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
>
>
> "Roy Danon" <admin@droyd.net> wrote in message
> news:btre0k$735$1@news2.netvision.net.il...>> > Here you go :)
> >
> > set rsNewsQuick=server.CreateObject("ADODB.recordset")
> > sqlNews="SELECT * FROM QuickNews order by id desc"
> > rsNewsQuick.Open sqlNews,dsn,1,1
> >
> >
> > Thanks,
> > Roy.
> >
> > "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> > news:Oh80bR%231DHA.4064@tk2msftngp13.phx.gbl...> >> > > > the first solution is the same as what i'm doin
> > >
> > > How do we know that? SHOW YOUR CODE.
> > >
> > > --
> > > Aaron Bertrand
> > > SQL Server MVP
> > > [url]http://www.aspfaq.com/[/url]
> > >
> > >
> >
>
Roy Danon Guest
-
Manohar Kamath [MVP] #8
Re: rs.Recordcount isn't working with mySQL
Roy,
Have you tried looping through the recordset to see if there are any
records, maybe zero is the right answer.
--
Manohar Kamath
Editor, .netBooks
[url]www.dotnetbooks.com[/url]
"Roy Danon" <admin@droyd.net> wrote in message
news:btre0k$735$1@news2.netvision.net.il...> Here you go :)
>
> set rsNewsQuick=server.CreateObject("ADODB.recordset")
> sqlNews="SELECT * FROM QuickNews order by id desc"
> rsNewsQuick.Open sqlNews,dsn,1,1
>
>
> Thanks,
> Roy.
>
> "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> news:Oh80bR%231DHA.4064@tk2msftngp13.phx.gbl...>> >> > > the first solution is the same as what i'm doin
> > How do we know that? SHOW YOUR CODE.
> >
> > --
> > Aaron Bertrand
> > SQL Server MVP
> > [url]http://www.aspfaq.com/[/url]
> >
> >
>
Manohar Kamath [MVP] Guest
-
Aaron Bertrand [MVP] #9
Re: rs.Recordcount isn't working with mySQL
Did you try [url]www.mysql.com?[/url]
Also, there are methods in the article posted that you may have missed or
ignored, such as:
set rs = conn.execute("SELECT COUNT(*) FROM table WHERE ...")
response.write rs(0) & " rows."
set rs = conn.execute("SELECT * FROM table WHERE ...")
if not rs.eof then
' ... process rs
end if
Also, just because you "don't always use" GetRows doesn't mean it is an
invalid solution for the problem you are currently having. You probably
"don't always use" a recordcount at all, either.
You seemed to discard it without a thought. Maybe you gave as much thought
to the database platform you chose.
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
"Roy Danon" <admin@droyd.net> wrote in message
news:bts32c$eum$1@news2.netvision.net.il...> Hi,
> I'm using the driver my hosting service adviced me to use :
>
> "Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Port=3306; Option=0;
> Socket=; Stmt=; Database=xxx_xxx; UID=xxx_xxx; PWD=xxx;"
>
> where can i find it's documention?
>
> Roy.
Aaron Bertrand [MVP] Guest
-
Roy Danon #10
Re: rs.Recordcount isn't working with mySQL
Hi,
My problem is actually that my website contains over 100 pages which
connects to the database and displays records using "for i = 1 to
rs.recordcount" or GetRows.
And I really don't have time to change my entire website and use getrows
instead of looping, because only about 10% of the webpages were converted to
GetRows after i had some resources issues.
So, first of all thank you.
I've returned to use MSSQL instead, and it meanwhile the site is online i
will change the pages to other methods and stop using recordcount and when
the site will be ready I will try and change my DB to mySQL again.
Thanks for everything,
Roy.
"Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
news:uT4pL1H2DHA.1908@TK2MSFTNGP10.phx.gbl...thought> Did you try [url]www.mysql.com?[/url]
>
> Also, there are methods in the article posted that you may have missed or
> ignored, such as:
>
> set rs = conn.execute("SELECT COUNT(*) FROM table WHERE ...")
> response.write rs(0) & " rows."
> set rs = conn.execute("SELECT * FROM table WHERE ...")
> if not rs.eof then
> ' ... process rs
> end if
>
> Also, just because you "don't always use" GetRows doesn't mean it is an
> invalid solution for the problem you are currently having. You probably
> "don't always use" a recordcount at all, either.
>
> You seemed to discard it without a thought. Maybe you gave as much> to the database platform you chose.
>
> --
> Aaron Bertrand
> SQL Server MVP
> [url]http://www.aspfaq.com/[/url]
>
>
>
>
> "Roy Danon" <admin@droyd.net> wrote in message
> news:bts32c$eum$1@news2.netvision.net.il...>> > Hi,
> > I'm using the driver my hosting service adviced me to use :
> >
> > "Driver={MySQL ODBC 3.51 Driver}; Server=localhost; Port=3306; Option=0;
> > Socket=; Stmt=; Database=xxx_xxx; UID=xxx_xxx; PWD=xxx;"
> >
> > where can i find it's documention?
> >
> > Roy.
>
Roy Danon Guest
-
Roy Danon #11
Re: rs.Recordcount isn't working with mySQL
No, there are about 20 records, and i havn't given any creteria(where ...)
Thanks,
Roy.
"Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
news:O9N69dH2DHA.3140@tk2msftngp13.phx.gbl...> Roy,
>
> Have you tried looping through the recordset to see if there are any
> records, maybe zero is the right answer.
>
> --
> Manohar Kamath
> Editor, .netBooks
> [url]www.dotnetbooks.com[/url]
>
>
> "Roy Danon" <admin@droyd.net> wrote in message
> news:btre0k$735$1@news2.netvision.net.il...>> > Here you go :)
> >
> > set rsNewsQuick=server.CreateObject("ADODB.recordset")
> > sqlNews="SELECT * FROM QuickNews order by id desc"
> > rsNewsQuick.Open sqlNews,dsn,1,1
> >
> >
> > Thanks,
> > Roy.
> >
> > "Aaron Bertrand [MVP]" <aaron@TRASHaspfaq.com> wrote in message
> > news:Oh80bR%231DHA.4064@tk2msftngp13.phx.gbl...> >> > > > the first solution is the same as what i'm doin
> > >
> > > How do we know that? SHOW YOUR CODE.
> > >
> > > --
> > > Aaron Bertrand
> > > SQL Server MVP
> > > [url]http://www.aspfaq.com/[/url]
> > >
> > >
> >
>
Roy Danon Guest
-
Aaron Bertrand - MVP #12
Re: rs.Recordcount isn't working with mySQL
> I've returned to use MSSQL instead, and it meanwhile the site is online i
Usually, MySQL is used when the cost of SQL Server or other RDBMS platforms> will change the pages to other methods and stop using recordcount and when
> the site will be ready I will try and change my DB to mySQL again.
is too prohibitive. If SQL Server is available, and it works, why do you
feel the need to switch to MySQL?
--
Aaron Bertrand
SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Aaron Bertrand - MVP Guest



Reply With Quote

