I have downloaded VStudioPro 8.6 and tried to use the new useful Parameters feature in the SQL Editor window. But unfortunately I always get from MySql a syntax error just around the parameter (see screenshot). My query looks like:

SELECT * FROM table WHERE field = :1;

and the value for parameter :1 has been filled in the right side list of parameter:value pairs.

You're right. I had forgotten about the types. Currently, I do a copy/paste from the source of the procedure being called and then edit it to remove the types.

Often, the variables that I am passing have the same names as the parameters, except that they begin with 'v' instead of 'p'. It is usually little effort to replace the 'p's with 'v's, but that brings up another idea.

Would it be a simple change to modify the SQL Editor Find/Replace to add an option that text is replaced only within the currently selected text? That would have other uses beyond renaming parameters to procedures.

And, one more thought. Could this feature to show parameters be extended to include built-in functions? For built-in functions, it would be nice to have the parameters that show up in the tooltip to be inserted if the developer accessed the menu option/shortcut key. For example,

I hesitated to post my idea here because I did not want to seem ungrateful (as if the feature were not good enough).

One of the ways that it saves time for me is when I copy a SQL statement to the SQL Editor in order to test it. In the past, I had to replace the placeholders with actual data in order to run the query. Once I had the query running correctly, I had to replace the data with the placeholders before copying it back to the source code. This feature allows me to leave the placeholders in the SQL statement. It also allows me to run a query multiple times with different parameter values more easily.

There could be multiple calls to parameterized stored procedures(/functions) within a BEGIN...END block. If the Editor could distinguish between them and show the parameters for the call at the cursor location, that would be a nice feature.

2. Auto-fill of parameters in stored procedures

This would allow a procedure call to be typed as:

call sp1()

in the SQL Editor. A menu option/shortcut key would cause the statement to be replaced with

The Editor would need to recognize that the stored procedure has parameters and would replace the () with the text from the stored procedure itself. This would retain any formatting (tab, return) that the developer included so that the result would be according to the developer's preference. Also, this operation would apply only to calls followed by "()" that target a stored procedure with parameters.

There could also be a setting in Preferences to allow this to happen automatically whenever a call to a parameterized procedure is followed by ().

* If you have database or project then attach it compressed to the report.
you can put up to 250Kb archives.
* Provide in the report as many detailed info as you can: OS, version, locale, ….
* If possible, please provide exact steps how to reproduce problem.
=========================================

I would like to be able to test a query that has parameters in the SQL Editor before using it in my application code.

It would be easier to make changes to the query in the SQL Editor rather than stepping through my application code with a debugger and trying to adjust it there.

Being able to create, modify, and test queries in the SQL Editor before adding them to my code allows me to focus on the query itself and prevents the possibility that something in my application code other than the query is affecting the results.

I do this with my other queries; I'm just not able to do this with a query that has parameters.