I have a small app where i am using a label and a single textbox in which i must type something. With this textbox i Will search content in a Sqlite database. For example:
Select field1,field2 from table1 where field3 like "%textbox1%";
When i click the Button to perform, it freezes, doesn't do nothing at all.
The question is how to handle this Textbox?
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
Still not working. As you can see, i placed 3 notifiers, one for the opening of the database, a 2nd for the queery and a 3rd for the closing of the database.
When i type something and click the "Continuar" button, nothing happens. None of the notifiers. I know i am missing something.
Dear friends TIMAI2,ABG and Taifun, thank you for your help.
My app is working well, almost at a 100%.
I inserted the block to Import the database and voila, it works really fine.
And by the way, the "Select" clause with the "where" option does the work very fine.
I attach the blocks for you. But there is a small warning:
If i type something like "nuisance" for example, i know that in my database this word does not exist, but i am receiving a message like this:
SQL COMMAND COMPLETED
How can avoid this situation?
May be with the block asking if the list is empty?
Any hint is very welcome.
You will need to handle this in your app on a case by case basis, given that the extension provides only one method to run a query, "it has to do all things for all people". In your case it means that no rows were returned from the database, otherwise you would get data. So handle the output accordingly:
if = "SQL command completed" then return "no rows returned" or "[]"
Your requirements will be different for each query you run, some queries are meant to return "SQL command completed", just to let you know it happened.