incorrect information in file: *.frm

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

incorrect information in file: *.frm

Post by Muhammad Saqib » Mon 07 Jul 2008 08:51

Hi i have successfully connected with embedded mysql server while making connection string in properties. But now while execution of my query to the data base i am finding this error: Incorrect information in file:'f:\..\data\database\*.frm'; Please guide me to how to resolve this problem and wot sort of mistakes i am committing thanks. Regards

Muhammad Saqib.

AlexeyB

Post by AlexeyB » Mon 07 Jul 2008 12:06

This error occurs due to a problem on the server, not in MyDirect. The *.frm files are MySQL table definition files. The problem is that the database contains incorrect data and may be corrupted. Please check the constraints consistency of your database

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Tue 08 Jul 2008 07:02

Well i am using MYSQL community server 6.0 and according to the steps mentioned in documentation i copy and paste data folder from server folder to embedded server folder. When i connect through server settings it works fine but with embedded database settings it shows the above message. well as far as concerned to the constraints and security issues theres no constraints and checks on the data yet.

AlexeyB

Post by AlexeyB » Tue 08 Jul 2008 08:27

I think that the problem may be in compatibility between different 6.0 versions of desktop and embedded MySql servers. Try to create test tables against the MyDirect connection from script, not by copying them from the desktop server folder. Than perform your SQL queries on those test tables. If the error is reproduced with this test script, please send it to us and we will deal with it.

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Tue 08 Jul 2008 08:46

well i am actually using an existing database that is created in MSSQL server with a large amount of records which is migrated from MSSQL to MYSQL.

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Tue 08 Jul 2008 08:50

One thing more if i want to use MYSQL of other version then which version do u recommend me to use thanks.

AlexeyB

Post by AlexeyB » Tue 08 Jul 2008 09:57

The problem is in possible incompatibility of your desktop and embedded MySQL servers, espesially in the table definitions files.
To ensure that the problem is or is not caused by MyDirect please create test tables on your embedded server from the following test script and perform simple SQL statements.
If these statements proceed this would mean that MyDirect itself has no problems with your MySQL embedded server version. In this case you need to recreate your database on embedded server from your own script, not by copying table data directly from the desktop server to embedded server catalog.

I've sent you the script that creates two test tables to e-mail specified in your profile.

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Tue 08 Jul 2008 10:59

HI Alex i didnt found your email yet kindly resend it on my yahoo id [email protected] thanks.

AlexeyB

Post by AlexeyB » Tue 08 Jul 2008 11:39

I sent you a script once more. In addition, i post this script with test tables here.

CREATE TABLE DEPT (
DEPTNO INT PRIMARY KEY,
DNAME VARCHAR(14),
LOC VARCHAR(13)
) TYPE = InnoDB;


CREATE TABLE EMP (
EMPNO INT PRIMARY KEY,
ENAME VARCHAR(10),
JOB VARCHAR(9),
MGR INT,
HIREDATE DATETIME,
SAL FLOAT,
COMM FLOAT,
DEPTNO INT,
CONSTRAINT EMP_FK FOREIGN KEY (DEPTNO) REFERENCES DEPT (DEPTNO)
) TYPE = InnoDB;

INSERT INTO DEPT VALUES (10,'ACCOUNTING','NEW YORK');
INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');
INSERT INTO DEPT VALUES (30,'SALES','CHICAGO');
INSERT INTO DEPT VALUES (40,'OPERATIONS','BOSTON');

INSERT INTO EMP VALUES
(7369,'SMITH','CLERK',7902,'1980-12-17',800,NULL,20);

INSERT INTO EMP VALUES
(7499,'ALLEN','SALESMAN',7698,'1981-2-20',1600,300,30);

INSERT INTO EMP VALUES
(7521,'WARD','SALESMAN',7698,'1981-2-22',1250,500,30);

INSERT INTO EMP VALUES
(7566,'JONES','MANAGER',7839,'1981-4-2',2975,NULL,20);

INSERT INTO EMP VALUES
(7654,'MARTIN','SALESMAN',7698,'1981-9-28',1250,1400,30);

INSERT INTO EMP VALUES
(7698,'BLAKE','MANAGER',7839,'1981-5-1',2850,NULL,30);

INSERT INTO EMP VALUES
(7782,'CLARK','MANAGER',7839,'1981-6-9',2450,NULL,10);

INSERT INTO EMP VALUES
(7788,'SCOTT','ANALYST',7566,'1987-7-13',3000,NULL,20);

INSERT INTO EMP VALUES
(7839,'KING','PRESIDENT',NULL,'1981-11-17',5000,NULL,10);

INSERT INTO EMP VALUES
(7844,'TURNER','SALESMAN',7698,'1981-9-8',1500,0,30);

INSERT INTO EMP VALUES
(7876,'ADAMS','CLERK',7788,'1987-7-13',1100,NULL,20);

INSERT INTO EMP VALUES
(7900,'JAMES','CLERK',7698,'1981-12-3',950,NULL,30);

INSERT INTO EMP VALUES
(7902,'FORD','ANALYST',7566,'1981-12-3',3000,NULL,20);

INSERT INTO EMP VALUES
(7934,'MILLER','CLERK',7782,'1982-1-23',1300,NULL,10);

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Tue 08 Jul 2008 11:56

well its not working if i try to run it via mysqlScript component provided by core lab and on execution it shows error message : "You have an error in your sql syntax; check the manual that corresponds to your MYSQL server version for th right syntax to use near" i think its compatibility issue kindly can you refer me a proper version of mysql to use please reply me as soon as possiblel thanks.

Muhammad Saqib
Posts: 11
Joined: Thu 03 Jul 2008 08:32

Post by Muhammad Saqib » Wed 09 Jul 2008 09:18

Hi i need to generate script of database from MSSQL server and run on mysqlscript component provided by corelab. what should i do.

AlexeyB

Post by AlexeyB » Wed 09 Jul 2008 11:31

The MySqlScript component is intended to execute scripts written in MySQL-compatible dialect of SQL. MSSQL Scripts use Transact-SQL dialect of SQL.
Trasact-SQL differs from MySQL SQL in many ways, therefore you need to convert it to MySQL-compatible SQL yourself (manually or with the help of third-party tools) and than execute it with the MySqlScript component.

Post Reply