Topic: SQLExecute

I have the following script: Form1.Label2.Caption:=sqlexecute ('select count(ID) from deelnemer') and is works good.

I want to change the script with a "Where"clause, so I thought it was easy and changed it to : Form1.Label2.Caption:=sqlexecute ('select count(ID) from deelnemer where country ='Nederland'')

That don't work. Can somebody help me with the correct syntax?

2 (edited by derek 2018-01-22 12:27:42)

Re: SQLExecute

Hello There,
Can you try this instead and see if it works
Form1.Label2.Caption:=sqlexecute ('select count(ID) from deelnemer where country = "Nederland"');
I have attached a couple of other examples of working with counts and labels that may help you along.  The form is a bit untidy, but simply because there are 4-5 different options to show (labels, buttons (with filters), an input field and clicking on the grid itself) .
I guess it all depends on how you want to present your data.
Hope this helps,
Derek.

Post's attachments

Attachment icon akkerhof.zip 339.43 kb, 455 downloads since 2018-01-22 

Re: SQLExecute

Thanks again.