On 9/12/06, Ada...@sk... <Ada...@sk...> wrote:
> Hallo,
>
> I was wondering if there's some kind of support for variable binding. Thank to its plugins, Squirrel makes a great pet. But i have hard time debuging query with parameters from my java source (e.g. select * from customers where id = ? and age > ? and ... and blahBlah > ? ). I can not bind variables like in other db tools.
>
> There's a workaround, but manual rewrite of all parameters to actual value is tidious work and it tends to be source of errors -- when one forgot to replace actual parameter back to question mark when finished.
>
> How do you execute such queries? Do you konw some 'handy' plugin for binding?
Adam,
You are right, that is pretty annoying. I can recall replacing the
"?" placeholders with
actual values by hand just recently. Indeed, it would be a nice
enhancement to scan
the SQL statement as it is being executed and if it has bind vars,
prompt for the value.
Would probably need to consult the metadata if the SQL didn't include
the list of
columns (for insert statements with many columns it would be confusing to know
which is which). But it's certainly doable. Why don't you submit a
feature request for
this and I'll look at it for the 2.4 release.
Rob
|