Reply to topic

Database stored query
Francesco Adinolfi


Joined: 10 Oct 2007
Posts: 2
Reply with quote
I have read that it is possible to create a stored query such that Gizmo wil prompt for parameters. This would be extremely useful, but I can't figure out how to create one. I have no problem running straight SQL queries.
Does anyone know how to do this ?
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
Hi Francesco,

The Stored Queries feature is available when you create a Query Analyzer button on the toolbar. To do this, enter the Gizmo Manager, and select Add/Remove buttons on my toolbar from the Start Page.

Click Add on the toolbar screen and select Query Analyzer from the dropdown. (Or open an existing Query Analyzer button) Next, setup your database settings accordingly.



Go to the Stored Queries tab and click Add to create a new Stored Query with this Query Analyzer.



Enter some information about the Stored Query, including the SQL itself. Invent a variable name for your parameter--it can be any string--but whatever you choose to make for the variable name, it must be unique, so that it does not interfere with any other strings in the query.

In this example, the variable is %LastName%. The variable will be automatically replaced with the value entered by the user, once the stored query is used.



Click Add to define the parameter. In this example, the parameter is Last Name. It corresponds to the variable %LastName%. Enter a prompt to display to the user, whenever the query is run.



Click OK until all the windows are closed, and save your changes to the toolbar. Run the button. You will be presented with the Query Analyzer. A popup-bubble will appear, notifying you that the Stored Query is available for this Query Analyzer. Go ahead and click on the button, pointed to by the bubble.



Upon clicking this button, you will see a list of all Stored Queries associated with this Query Analyzer. There is only one Stored Query, in this example. Go ahead and select the Stored Query.



Next we are prompted for the parameter, Last Name.



Finally the query is complete.


_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Francesco Adinolfi


Joined: 10 Oct 2007
Posts: 2
Reply with quote
Thanks a lot !
View user's profileSend private message
Logan Mueller
Support

Joined: 16 Nov 2003
Posts: 565
Reply with quote
You bet!

_________________
Support is provided as a convenience to our users. We make no guarantees in the timeliness and accuracy in our responses. We reserve the right to refuse service to anyone.
View user's profileSend private messageVisit poster's website
Database stored query
All times are GMT - 8 Hours  
Page 1 of 1  

  
  

 Reply to topic