Re: Upgrading MySQL causes Error - ASP

2001-03-01 Thread Celso

Gerald,

I've written to them asking your question.
I'd like to point out that I just got an empty record set when it is running
under ASP.
The query runs successfully through phpMyAdmin 2.0.5. I realized that the
query
(select count(*) as quantity from person;) works well in ASP so that I think
it should be something
related to GROUP BY clause.

Celso.

- Original Message -
From: Gerald L. Clark <[EMAIL PROTECTED]>
To: Celso Pires <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, March 01, 2001 11:11
Subject: Re: Upgrading MySQL causes Error - ASP


> They replaced your MySQL with a new version.
> Did they re-compile Apache and PHP to use the new MySQL libraries,
> or is it trying to use the now missing ones?
>
> Celso Pires wrote:
> >
> > Hi there,
> >
> > I've got a site hosted at an ISP and everything was going well when they
> > decided to upgrade the software.  Now my site is running under Win2K,
IIS5,
> > MySQL 3.23.33 and MyODBC 2.50.36.
> > In order to get easier to explain what is going wrong, I've built the
> > following test:
> >
> > CREATE TABLE person (
> > person_ID INTEGER NULL,
> > name CHAR(50) NULL,
> > gender CHAR(1) NULL
> > );
> >
> > INSERT INTO person (person_id, name, gender) values
> >
(1,'Bob','m'),(2,'Mary','f'),(3,'Antony','m'),(4,'Rose','f'),(5,'Kuerten','m
');
> >
> > mysql> select count(*) as quantity, gender
> > -> from person
> > -> group by gender;
> > +--++
> > | quantity | gender |
> > +--++
> > |2 | f  |
> > |3 | m  |
> > +--++
> > 2 rows in set (0.01 sec)
> >
> > *** As you can realize, so far so good. Now things get worse ***
> >
> > 
> > 
> > GROUP BY TEST
> > 
> > 
> > <%
> > Response.Write "Begin"
> >
> > strConn =
> >
"DRIVER=MySQL;SERVER=myserver;DATABASE=mydatabase;UID=myuser;PWD=mypass;"
> > Set conn = Server.Createobject("ADODB.Connection")
> > conn.Open(strConn)
> >
> > strSQL = "select count(*) as quantity, gender "
> > strSQL = strSQL & "from person "
> > strSQL = strSQL & "group by gender;"
> >
> > Response.Write strSQL & ""
> >
> > Set Rs = conn.Execute(strSQL)
> >
> > While Not Rs.EOF
> >Response.Write "Quantity: " & RS("quantity") & " - Gender: " &
> > RS("gender") & ""
> >Rs.MoveNext
> > Wend
> >
> > Rs.Close
> > conn.close
> > response.write "The End"
> > %>
> > 
> > 
> >
> > *** The page above should print:
> > Begin
> > select count(*) as quantity, gender from person group by gender;
> > Quantity: 2 - Gender: f
> > Quantity: 3 - Gender: m
> > The End
> >
> > *** Instead, I'm getting this:
> >
> > Begin
> > select count(*) as quantity, gender from person group by gender;
> > The End
> >
> > *** It means that the record set is empty.
> >
> > Thank you very much for any help.
> >
> > Regards,
> >
> > Celso.
> >
_
> > Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com.
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Upgrading MySQL causes Error - ASP

2001-03-01 Thread Gerald L. Clark

They replaced your MySQL with a new version.
Did they re-compile Apache and PHP to use the new MySQL libraries,
or is it trying to use the now missing ones?

Celso Pires wrote:
> 
> Hi there,
> 
> I've got a site hosted at an ISP and everything was going well when they
> decided to upgrade the software.  Now my site is running under Win2K, IIS5,
> MySQL 3.23.33 and MyODBC 2.50.36.
> In order to get easier to explain what is going wrong, I've built the
> following test:
> 
> CREATE TABLE person (
> person_ID INTEGER NULL,
> name CHAR(50) NULL,
> gender CHAR(1) NULL
> );
> 
> INSERT INTO person (person_id, name, gender) values
> (1,'Bob','m'),(2,'Mary','f'),(3,'Antony','m'),(4,'Rose','f'),(5,'Kuerten','m');
> 
> mysql> select count(*) as quantity, gender
> -> from person
> -> group by gender;
> +--++
> | quantity | gender |
> +--++
> |2 | f  |
> |3 | m  |
> +--++
> 2 rows in set (0.01 sec)
> 
> *** As you can realize, so far so good. Now things get worse ***
> 
> 
> 
> GROUP BY TEST
> 
> 
> <%
> Response.Write "Begin"
> 
> strConn =
> "DRIVER=MySQL;SERVER=myserver;DATABASE=mydatabase;UID=myuser;PWD=mypass;"
> Set conn = Server.Createobject("ADODB.Connection")
> conn.Open(strConn)
> 
> strSQL = "select count(*) as quantity, gender "
> strSQL = strSQL & "from person "
> strSQL = strSQL & "group by gender;"
> 
> Response.Write strSQL & ""
> 
> Set Rs = conn.Execute(strSQL)
> 
> While Not Rs.EOF
>Response.Write "Quantity: " & RS("quantity") & " - Gender: " &
> RS("gender") & ""
>Rs.MoveNext
> Wend
> 
> Rs.Close
> conn.close
> response.write "The End"
> %>
> 
> 
> 
> *** The page above should print:
> Begin
> select count(*) as quantity, gender from person group by gender;
> Quantity: 2 - Gender: f
> Quantity: 3 - Gender: m
> The End
> 
> *** Instead, I'm getting this:
> 
> Begin
> select count(*) as quantity, gender from person group by gender;
> The End
> 
> *** It means that the record set is empty.
> 
> Thank you very much for any help.
> 
> Regards,
> 
> Celso.
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Upgrading MySQL causes Error - ASP

2001-02-28 Thread Celso Pires

Hi there,

I've got a site hosted at an ISP and everything was going well when they 
decided to upgrade the software.  Now my site is running under Win2K, IIS5, 
MySQL 3.23.33 and MyODBC 2.50.36.
In order to get easier to explain what is going wrong, I've built the 
following test:

CREATE TABLE person (
person_ID INTEGER NULL,
name CHAR(50) NULL,
gender CHAR(1) NULL
);

INSERT INTO person (person_id, name, gender) values
(1,'Bob','m'),(2,'Mary','f'),(3,'Antony','m'),(4,'Rose','f'),(5,'Kuerten','m');

mysql> select count(*) as quantity, gender
-> from person
-> group by gender;
+--++
| quantity | gender |
+--++
|2 | f  |
|3 | m  |
+--++
2 rows in set (0.01 sec)

*** As you can realize, so far so good. Now things get worse ***



GROUP BY TEST


<%
Response.Write "Begin"

strConn = 
"DRIVER=MySQL;SERVER=myserver;DATABASE=mydatabase;UID=myuser;PWD=mypass;"
Set conn = Server.Createobject("ADODB.Connection")
conn.Open(strConn)

strSQL = "select count(*) as quantity, gender "
strSQL = strSQL & "from person "
strSQL = strSQL & "group by gender;"

Response.Write strSQL & ""

Set Rs = conn.Execute(strSQL)

While Not Rs.EOF
   Response.Write "Quantity: " & RS("quantity") & " - Gender: " & 
RS("gender") & ""
   Rs.MoveNext
Wend

Rs.Close
conn.close
response.write "The End"
%>



*** The page above should print:
Begin
select count(*) as quantity, gender from person group by gender;
Quantity: 2 - Gender: f
Quantity: 3 - Gender: m
The End

*** Instead, I'm getting this:

Begin
select count(*) as quantity, gender from person group by gender;
The End

*** It means that the record set is empty.

Thank you very much for any help.

Regards,

Celso.
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php