Page 1 of 1

TMyQuery error on MySQL on RedHat Linux server

Posted: Wed 24 Nov 2004 07:21
by kenny
Hi, my database is on RedHat Linux server MySQL 4.0
The problem is when I used TMyQuery to open a table.

With QmyResult Do Begin
Close;
SQL.Clear;
SQL.add('SELECT * FROM Employee');
Open;
End;

I get the error message : the Employee table is not found
But I have the table in this case.

Anyway, when I change my query statement to :-
SQL.Add('SELECT * FROM employee');

Then it work ok.
So I suspend that the case sensitive for the TABLE NAME....

TMyQuery doesn't AUTO convert the SQL statement before open/execute it? :?
p/s : I used in window's mySQL version is OK, the case sensitive is no more a problem...

environment : Delphi 5, MySQL 4.0 on Redhat Linux, MyDac 3.3.012

Re: TMyQuery error on MySQL on RedHat Linux server

Posted: Wed 24 Nov 2004 12:26
by Ikar
It is a specific MySQL server.
Please see http://dev.mysql.com/doc/mysql/en/Name_ ... ivity.html

Posted: Wed 24 Nov 2004 14:07
by kenny
Thanks for your information, Ikar.

this mean that if I wish to solve this case sensitivity problem, I then need to do at this way in TMyQuery component: ?

With QmyResult Do Begin
Close;
SQL.Clear;
SQL.add('SELECT * FROM Employee');
SQL.Text := Lowercase(SQL.Text);
Open;
End;

............but I have used over 1000+ TmyQuery component in my application ~~ :( :( :cry:
need to change one by one.............?????

Posted: Wed 24 Nov 2004 15:42
by Ikar
Suppose, it'd be easy to turn MySQL server in case unsensitive mode.

Posted: Wed 24 Nov 2004 16:12
by Guest
Hello

I just hear this ,,,
I dont sounds like a good idear this lower() thing
imagine , when u make an insert of a string ,,,
someone maybe want it so be in capital.

think servers allways should be incasetiv
casesentive thing is a nightmare

if you really want to use the lower () methode
you could loop throught all ur compoents and set the
onopen event to point to a methode which maked the lower() thing.

just my 2 cent.

Regards
Kim

Posted: Thu 25 Nov 2004 03:30
by Guest
Thanks for your advised!
Well, I had decided to change only the table name to lowercase for all of my query... this will avoid the problem of parameter value where might have to remain it's value... :cry: