Hi Crimmelcp, this is Guba.
What you're triyng to do is not correct.
You start from the wrong point that you're dealing with a stand-alone application, running onto your PC.
This isn't true.
Your template isn't executed onto your pc but on the server.
So you must advise in some way the server that you want it to perform a query on the connected database and do something with the data it will retrieve.
You do this by sending some data to the server with a form post, a http url link or something.
If you want to do it via a form button use a submit button and set the action of the form to a template which executes the query.
This may be the same template itself.
Put this on the top of the template itself:
<CFIF IsDefined("FORM.ShowAll")>
<CFQUERY NAME... >
SELECT .....
</CFQUERY>
</CFIF>
Put ACTION=".....cfm" [the name of your template] in the form, practically a template that calls itself.
Modify your button as follows:
<cfinput type="Submit" name="ShowAll" value="Show All" width="175">
Then populate your template with data if they are available.
Hope this helps
Guba