Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FireDac not insert "&" symbol into SQLITE varchar

We have table1 in SQLITE database.

  CREATE TABLE table1 (id int PRIMARY KEY ,name nvarchar );    

After using in DELPHI XE3 Firedac ADQuery SQL command

  INSERT INTO table1 (id,name)  VALUES (1,'&Text To &Insert.')

we have in column name only "To ." All the text starting with & symbol until any punctuation symbol is not copied! there are 2 exceptions: Texts followed by && or \& are being copied correctly. The same command in Sqlite Expert Personal app works OK.

Is it Firedac bug? And How Copy texts into database containing & symbol using Firedac? (texts are HTML documents containing many "&" symbols)

like image 809
Avrob Avatar asked Apr 21 '26 13:04

Avrob


1 Answers

This is a FAQ:

Q8: My query containing the '&', '!' characters fails to execute correctly. What is wrong?

[…] '&' specifies the beginning of a macro variable. […] If you do not use macros, then set ResourceOptions.MacroCreate and MacroExpand to False.

like image 78
CL. Avatar answered Apr 23 '26 01:04

CL.