Can connect to MySQL 4.0 in Debian, but can not execute SELECT

Can connect to MySQL 4.0 in Debian, but can not execute SELECT

Postby jarot » Wed 04 Jan 2006 04:17

I use MyDAC 4.0.0.13 Trial version for Delphi 7 on Windows XP. I Tried to connect to MySQL server version 4.0.24_Debian-10-Log.

Procedure TryToConnect;
begin
MyConnection.Connect; //succesful
MyQuery1.SQL.Text := 'SELECT * from Table001';
MyQuery1.Open; //failed, "table mydb.Table001 doesn't exist"
end;

I use libmysql.dll from MySQL 4.1.8 and 4.0.17. Both failed, same error message.
jarot
 
Posts: 5
Joined: Wed 04 Jan 2006 04:07

Postby Ikar » Wed 04 Jan 2006 14:38

Please check MyConnection.Database value.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: Can connect to MySQL 4.0 in Debian, but can not execute SELECT

Postby jarot » Sun 08 Jan 2006 09:16

Thanks for the reply. I fixed the problem.

It's the case-sensitivity for database and table names in Linux systems. This happened because I developed the database and application using MS Windows. When I executed this on Windows:

create table Table001 ( FieldA varchar(2), FieldB varchar(2) );

Instead of creating table "Table001", it created "table001", which caused problem when the exact database was copied from Windows to Linux system.

The solution without rewriting the application's SQL scripts: run the create scripts on the Linux system.
jarot
 
Posts: 5
Joined: Wed 04 Jan 2006 04:07

Re: Can connect to MySQL 4.0 in Debian, but can not execute SELECT

Postby eduardosic » Wed 18 Jan 2006 02:53

jarot wrote:Thanks for the reply. I fixed the problem.

It's the case-sensitivity for database and table names in Linux systems. This happened because I developed the database and application using MS Windows. When I executed this on Windows:

create table Table001 ( FieldA varchar(2), FieldB varchar(2) );

Instead of creating table "Table001", it created "table001", which caused problem when the exact database was copied from Windows to Linux system.

The solution without rewriting the application's SQL scripts: run the create scripts on the Linux system.


jarot, please, mySQL running in Linux is more fast then running in Windows? escuse my bad english..
eduardosic
 
Posts: 387
Joined: Fri 18 Nov 2005 00:26
Location: Brazil


Return to MySQL Data Access Components