#42000 Error message!!

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
MYDAC100
Posts: 3
Joined: Fri 30 Mar 2018 20:01

#42000 Error message!!

Post by MYDAC100 » Fri 15 May 2020 01:03

Hi,

When I run this code

Code: Select all

procedure TForm1.Button5Click(Sender: TObject);
begin
    Students_Table2.First;

    while Not   Students_Table2.Eof  do
    begin
          Students_Table2.Edit;

              Students_Table2.FieldByName('SENT').AsInteger := 1;
            Students_Table2.Post;

        Students_Table2.Next;
    end;
end;
end.

an error appears
"#42000You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'KEY = 843' at line 5."

May you please help me to fix it so i can edit my Database

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: #42000 Error message!!

Post by ViktorV » Fri 15 May 2020 09:06

Unfortunately, we haven't been able to reproduce the issue.
In order for us to be able to give you a detailed answer, we need to have a sample demonstrating the specified behavior. Therefore, please compose a small sample demonstrating the described behavior and send it to us using the contact form https://devart.com/company/contactform.html including the scripts for creating database objects. Please also indicate the full and accurate versions of MySQL and MyDAC.

MYDAC100
Posts: 3
Joined: Fri 30 Mar 2018 20:01

Re: #42000 Error message!!

Post by MYDAC100 » Sat 16 May 2020 11:21

I sent you the full code. waiting for your detailed answer

MYDAC100
Posts: 3
Joined: Fri 30 Mar 2018 20:01

Re: #42000 Error message!!

Post by MYDAC100 » Sun 17 May 2020 03:42

Still waiting for your help ... yet, haven't received any respond .. I sent the email with the source code but no answer

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: #42000 Error message!!

Post by ViktorV » Mon 18 May 2020 08:07

To solve the issue, please, set the TMyTable.Options.QuoteNames property to True.

MYDAC100
Posts: 3
Joined: Fri 30 Mar 2018 20:01

Re: #42000 Error message!!

Post by MYDAC100 » Wed 20 May 2020 23:27

It works :)

THANK YOU

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: #42000 Error message!!

Post by ViktorV » Thu 21 May 2020 14:39

Thank you for the interest to our product.
It is good to see that the problem has been solved.
If you have any questions during using our products, please don't hesitate to contact us - and we will try to help you solve them.

Post Reply