I am building this simple query using following code:
FDQuery1.SQL.Text := 'INSERT INTO album SET customer_id=' + Chr(39) + IntToStr(CustomerID) + Chr(39) + ',lab_id=' + Chr(39) + IntToStr(LabID) + Chr(39) +
', album_name_c = ' + Chr(39) + ProjectFolderName + Chr(39) +
', album_name_s = ' + Chr(39) + ProjectFolderNameOnServer + Chr(39) +
' ,album_size=' + Chr(39) + txtAlbumSize.Text + Chr(39) +
', album_paper=' + Chr(39) + txtPaperFinish.Text + Chr(39) +
', album_cover=' + Chr(39) + txtCover.Text + Chr(39) +
', album_binding=' + Chr(39) + txtBinding.Text + Chr(39) +
', album_coating=' + Chr(39) + txtCoating.Text + Chr(39) +
', starts_from=' + Chr(39) + BoolToStr(chkRight.Checked) + Chr(39) +
'; SELECT LAST_INSERT_ID() AS RecID;';
But when I call FDQuery1.OpenOrExecute I get error message as stated in subject of this post.
Current query length is around 299 characters.
I read somewhere on internet that the Query length should be less than 255 characters, so I have also tried to shorten the query but keep its length below 255 characters.
But still I get the same error message.
What wrong am I doing here please guide me.
TIA
Yogi Yang