EMySqlEcxeption with message '#42S02Table 'test;emp' doesn't exist

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

EMySqlEcxeption with message '#42S02Table 'test;emp' doesn't exist

Post by elran » Mon 04 Dec 2006 10:19

Hi there,
i've just downloaded MyDac for delphi7, trying to use the demo: "Using TMyTable component", i get this error message (see title) once i try to connect to my database, what could be the reason?

elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

Post by elran » Mon 04 Dec 2006 10:22

trying with another demo i get the same message but with:
test.employees does not exist,
yet it does exist, i've verified it myself.

i'm running version 4.1 of mysql server, btw...

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 04 Dec 2006 15:40

Please check if you connect to the same MySQL Server. Probably host name or port number are specified incorrectly.

elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

Post by elran » Wed 06 Dec 2006 08:08

well, just to make sure i've checked, but they're not...
(localhost/3306)
that's alse what i use on Delphi...


i've got two mysql services running, one is used to make tests that's version 4.1, the other is the one i develop on, version 3.23.

when i try to use mydac, i disable version 3.23.

elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

Post by elran » Wed 06 Dec 2006 08:13

trying to use conndialog, which is a demo coming with MyDac, i noticed that when i change the database i wish to connect to (my previous message mentionned a database named test) it still try to find a table named "employees", see the error message:

EMySqlException with message ' #42S02Table 'mysql.employees' doesn't exist'...

well on this one for sure it's right, there are no table named employees in this database!

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Wed 06 Dec 2006 16:33

Please run the Query demo of MyDAC, paste the following SQL code into the memo and push the Open button (note, this multi-statement query not be executed on MySQL 3.23).

Code: Select all

DROP TABLE IF EXISTS EMP;

CREATE TABLE EMP (
  EMPNO INT PRIMARY KEY,
  ENAME VARCHAR(10),
  JOB VARCHAR(9),
  MGR INT,
  HIREDATE DATETIME,
  SAL FLOAT,
  COMM FLOAT,
  DEPTNO INT
);

INSERT INTO EMP VALUES
  (7369,'SMITH','CLERK',7902,'1980-12-17',800,NULL,20);
  
SELECT * FROM EMP
If no error is raised and you see a single record in the grid, try to test the Table demo with the Emp table name.

elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

Post by elran » Mon 11 Dec 2006 13:41

ok, it worked...
it did print me what was inserted..

i'm going to try some more test with this demo...

elran
Posts: 6
Joined: Mon 04 Dec 2006 10:14

Post by elran » Mon 11 Dec 2006 13:46

could the problem come from the fact that i have two mysql services running?
it works when i becarefull to close one of them...

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 11 Dec 2006 14:46

No, simply running two instances of MySQL Server should not cause any problem. Probably the table is created on the first server, but is requested from another one. Be careful entering parameters to connect to a server.

Post Reply