Page 1 of 1

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

Posted: Mon 04 Dec 2006 10:19
by elran
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?

Posted: Mon 04 Dec 2006 10:22
by elran
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...

Posted: Mon 04 Dec 2006 15:40
by Antaeus
Please check if you connect to the same MySQL Server. Probably host name or port number are specified incorrectly.

Posted: Wed 06 Dec 2006 08:08
by elran
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.

Posted: Wed 06 Dec 2006 08:13
by elran
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!

Posted: Wed 06 Dec 2006 16:33
by Antaeus
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.

Posted: Mon 11 Dec 2006 13:41
by elran
ok, it worked...
it did print me what was inserted..

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

Posted: Mon 11 Dec 2006 13:46
by elran
could the problem come from the fact that i have two mysql services running?
it works when i becarefull to close one of them...

Posted: Mon 11 Dec 2006 14:46
by Antaeus
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.