Re: [fpc-pascal] sqldb query error on group by with where clause

2007-09-15 Thread Joost van der Sluis
Op zaterdag 15-09-2007 om 01:11 uur [tijdzone +0700], schreef Bee:

> tested on sqldb using tmysql50connection class on FPC 2.0.2, Ubuntu Feisty, 
> mySQL 5.0.

First of all, update to 2.2.0. And try ParseSQL := False, as Michael
said.

Joost

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] sqldb query error on group by with where clause

2007-09-15 Thread Bee
Nevertheless, it's MySQL that reports the error. 


Yes. But what did sqlDB do to the query so mysql didn't accept it?


Please set 'ParseSQL' to false and see if that helps ?


Yes, it helps. Thank you.

What does ParseSQL do anyway? What are the benefit of it?

-Bee-

has Bee.ography at:
http://beeography.wordpress.com

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] sqldb query error on group by with where clause

2007-09-15 Thread Stephano
select k_province, k_city, k_school, count(file_id), >sum(amt_student) from 
upload_log where (date(upload_time)>='2007-09-14') group by k_province, 
k_city having k_province='205' >and k_city='205031';

raises exception...Add k_school to the group by clause.Stephano


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] sqldb query error on group by with where clause

2007-09-15 Thread Marc Santhoff
Am Samstag, den 15.09.2007, 18:57 +0700 schrieb Bee:
> > Nevertheless, it's MySQL that reports the error. 
> 
> Yes. But what did sqlDB do to the query so mysql didn't accept it?
> 
> > Please set 'ParseSQL' to false and see if that helps ?
> 
> Yes, it helps. Thank you.
> 
> What does ParseSQL do anyway? What are the benefit of it?

This question can be answered by activating logging on the mysql server.

The log will show much detail, so beware of filling up your disk drive.

HTH,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] why is there no port property in sqldb?

2007-09-15 Thread Bee
One of the most basic paramater for database connection: port, is not 
provided in sqlDB. While dialect property which is not common outside FB/IB 
is provided. Is there any particular reason for this? Or should I make a 
feature request on this?


BTW, how to set port for mysql connection using sqlDB? Defining "port=3307" 
or "-P 3307" on params property seems to be ignored. Using "hostname:port" 
on hostname property is also not working. Thanks for the help.


-Bee-

has Bee.ography at:
http://beeography.wordpress.com
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal