Hi All
Im using 7.2.4-stable with Delphi Berlin starter 10.1
Code:
DM.ZConnection1.Connected := true;
DM.InfoSQL.SQL.Clear;
DM.InfoSQL.SQL.Add('DELETE FROM aInfo WHERE SUPPLIER_NAME = ''Lovato''');
DM.InfoSQL.ExecSQL;
// DM.InfoSQL.Active := true;
If i leave out the WHERE condition the delete works and emptys the table
with the WHERE condition I get the following error
SQL Error: SQL logic error or missing database.
if I run the 'DELETE FROM aInfo WHERE SUPPLIER_NAME = 'Lovato'
in SQLStudio it works
Ive tried the DM.InfoSQL.Active := true; and get the same error
DM.InfoSQL connection is set in its properties to DM.ZConnection1
All other values on the connection and Query component are default.
Thanks in advance for any advice
Delete with conditon problem
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delete with conditon problem
Hello
Which database do you use? Currently I am guessing SQLite. If it is SQLite it might make sense to try Zeos 7.3 SVN because it has better error reporting for SQLite than Zeos 7.2. You can also try Zeos 7.2 from SVN and set the parameter ExtendedErrorMessage to 1 or Yes or true to get the extended error information.
Which database do you use? Currently I am guessing SQLite. If it is SQLite it might make sense to try Zeos 7.3 SVN because it has better error reporting for SQLite than Zeos 7.2. You can also try Zeos 7.2 from SVN and set the parameter ExtendedErrorMessage to 1 or Yes or true to get the extended error information.
-
- Fresh Boarder
- Posts: 9
- Joined: 05.02.2018, 00:27
Re: Delete with conditon problem
Hi marsupilami
Thanks for that. Yes its SQLite. Ill upgrade and see what happens. Much appreciated.
Thanks for that. Yes its SQLite. Ill upgrade and see what happens. Much appreciated.
-
- Fresh Boarder
- Posts: 9
- Joined: 05.02.2018, 00:27
Re: Delete with conditon problem
Hi marsupilami
The extended error message is
SQL Error: Error: SQL logic error or missing database
Message: no such collation sequence: SYSTEMNOCASE.
The table was generated by a Mormot server with this Collation. Is there a way to add support for this collation
Thanks
The extended error message is
SQL Error: Error: SQL logic error or missing database
Message: no such collation sequence: SYSTEMNOCASE.
The table was generated by a Mormot server with this Collation. Is there a way to add support for this collation
Thanks
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: Delete with conditon problem
Hello iancoullie,
duh - it seems that Mormot has registered its own collation with that database: https://www.sqlite.org/faq.html#q18. So you probably will have to register it from your Zeos application as well or use Mormot for accessing the data.
I am not sure if we currently expose the required functions for registering custom collations with SQLite I have to check that. SYSTEMNOCASE uses a Mormot specific function. See Mormot SynSQLite3.pas
Best regards,
Jan
duh - it seems that Mormot has registered its own collation with that database: https://www.sqlite.org/faq.html#q18. So you probably will have to register it from your Zeos application as well or use Mormot for accessing the data.
I am not sure if we currently expose the required functions for registering custom collations with SQLite I have to check that. SYSTEMNOCASE uses a Mormot specific function. See Mormot SynSQLite3.pas
Best regards,
Jan
-
- Fresh Boarder
- Posts: 9
- Joined: 05.02.2018, 00:27
Re: Delete with conditon problem
Thanks Jan
I use the zeos component in a tiny app that updates data daily from a variety of XLS spreadsheets.
The app was previously connected to a firebird database and i am changing it to SQLite.
The irony is that the error only occurs with a delete with condition. The full delete works and the insert works.
Ill weigh up my options.
Thanks for your help
I use the zeos component in a tiny app that updates data daily from a variety of XLS spreadsheets.
The app was previously connected to a firebird database and i am changing it to SQLite.
The irony is that the error only occurs with a delete with condition. The full delete works and the insert works.
Ill weigh up my options.
Thanks for your help
-
- Fresh Boarder
- Posts: 9
- Joined: 05.02.2018, 00:27
Re: Delete with conditon problem
Hi Jan
Problem solved. I dropped the table and recreated without the collation.
As these are small tables and i have not noticed a speed drop when connecting with the mormot server.
Thanks very much
Problem solved. I dropped the table and recreated without the collation.
As these are small tables and i have not noticed a speed drop when connecting with the mormot server.
Thanks very much