SQL Import not working after export -

[expired user #4004]'s profile image [expired user #4004] posted 15 years ago in Import/Export Permalink


No matter if I use revision 1691 or the newest 2374 of HeidiSQL both to export/dump a table and afterwards tries to import/load it again using HeidiSQL it gives the error shown on the picture.

ERROR:
You have an error in your SQL syntax - check the manual - right syntax to use near xxx WRITE at line 1.

I use 5.0.45 community version of MySQL Server.
And I have checked the manual 5.0 should support the line LOCK TABLES...

---- snap from my SQL file created by HeidiSQL ---
#
# Dumping data for table 'lytter_genrer'
#

LOCK TABLES "lytter_genrer" WRITE;
/*!40000 ALTER TABLE "lytter_genrer" DISABLE KEYS;*/
REPLACE INTO "lytter_genrer" ("pID", "gID", "cID") VALUES
(760,1,0);
------------------------------------------------------------

What is wrong?
Why is it not possible to export AND import in the excact same version of HeidiSQL?
What should I do in order to be able to import again?
ansgar's profile image ansgar posted 15 years ago Permalink
> HeidiSQL it gives the error shown on the picture.

No picture here.

>You have an error in your SQL syntax - check the manual -
> right syntax to use near xxx WRITE at line 1.

What is "xxx" - the most important part of the error message ?
[expired user #4004]'s profile image [expired user #4004] posted 15 years ago Permalink
The error "xxx" was...:

Error.
SQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax near '"my_table" WRITE' at line 1.

But I mean. the whole SQL-file is MADE by HeidiSQL's export function, so why can it not IMPORT it again?
[expired user #4004]'s profile image [expired user #4004] posted 15 years ago Permalink
my_table is "lytter_genrer"
[expired user #1125]'s profile image [expired user #1125] posted 15 years ago Permalink
may be because you're trying to import ANSI SQL to a MySQL server in default (non-ANSI) mode.

if you are not going to be using MSSQL, PostgreSQL or similar, just export files in "mysql" mode.
[expired user #4004]'s profile image [expired user #4004] posted 15 years ago Permalink
Oh Rosenfield! Thank u! THAT was the case! :)

Please login to leave a reply, or register at first.