TMyQuery error on MySQL on RedHat Linux server

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

TMyQuery error on MySQL on RedHat Linux server

Post by kenny » Wed 24 Nov 2004 07:21

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

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: TMyQuery error on MySQL on RedHat Linux server

Post by Ikar » Wed 24 Nov 2004 12:26

It is a specific MySQL server.
Please see http://dev.mysql.com/doc/mysql/en/Name_ ... ivity.html

kenny
Posts: 43
Joined: Mon 15 Nov 2004 08:48
Location: Malaysia
Contact:

Post by kenny » Wed 24 Nov 2004 14:07

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.............?????

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Wed 24 Nov 2004 15:42

Suppose, it'd be easy to turn MySQL server in case unsensitive mode.

Guest

Post by Guest » Wed 24 Nov 2004 16:12

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

Guest

Post by Guest » Thu 25 Nov 2004 03:30

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:

Post Reply