Rod Stewart 0 Posted August 9 Hello all, I am converting a huge ZeosLib database application to FireDac under Delphi XE 10. All queries are executed by setting the SQL.Text property at runtime. On some queries I get exception messages like this: [FireDAq[Phys][SQLite] ERROR: near';": syntax error The fix for this problem is to remove semicolons from the end of SQL statements. I am wondering if there is a property I can change and keep semicolons at the end of SQL statements to avoid mass changes? Thank you. Share this post Link to post
krayna 0 Posted August 9 FireDac is more strict especially with certain databases like SQLite, where the semicolon as the end of the statement can generate syntax errors. Search/replace of the sql statements (with regex) is not an option for you? Alternatively you could create a descendant of TFDQuery and override ExecSql where you delete the semicolon at the end of sql.text. In this case you have to replace your TFDQuery objects with TFDMyQuery of course but you don't need to change the rest of the code. Share this post Link to post
eivindbakkestuen 47 Posted August 11 On 8/10/2024 at 12:14 AM, Rod Stewart said: Delphi XE 10. There is no such version... Share this post Link to post
Roger Cigol 107 Posted August 12 or write a function that checks if your text ends with a ';' character and if so deletes the ';' character. Then use a global search for each time you set the SQL property of the query and surround each text with a call to your new function..... Share this post Link to post