Try:
SELECT vgrupp, type, count(*) as recordcount FROM main GROUP BY vgrupp,
type
and pull the rs.fields("recordcout")
-----Original Message-----
From: Venu [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 2:25 PM
To: Mattias Persson; [EMAIL PROTECTED]
Subject: RE: Problem with ASP and GROUP BY queries
Hi,
> -----Original Message-----
> From: Mattias Persson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 19, 2001 5:14 AM
> To: [EMAIL PROTECTED]
> Subject: Problem with ASP and GROUP BY queries
>
>
> My query:
>
> SELECT vgrupp, type, count(*) FROM main GROUP BY vgrupp, type
>
> I have a problem with MySQL and a query. If I type the Query in a
> program with direct db connect, in my case EMS Mysql manager,
> everything works OK but when I use it from an ASP page it don't. I
> don't get any matches, it even works with an ODBC connection to MS Query.
>
> I have tried to use sum(id) in stead of count(*) and it works fine
> but of course dosen't give the information that i want. I can use
> count(*) without the GRUOP BY and it works OK, it seams that the
> only query that don't work is the query i wan't.
>
> I run the MySQL server locally on a computer with Win98 installed, I
> use PWS for testing purpose but i don't think there will be any
> difference when I install it on IIS 5...
>
> Anybody have any tip how to fix this?
>
It will work after specifying the OPTION=16386, or by enabling the
appropriate flags from DSN configure dialog. For more info on the
flags, refer to MyODBC online manual, which describes this issue.
Regards, Venu
--
For technical support contracts, go to https://order.mysql.com
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Venu <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Developer
/_/ /_/\_, /___/\___\_\___/ California, USA
<___/ www.mysql.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