MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » February 2014

Re: JDBCR4 question -- Checking the syntax of a query without crashing the JVM



fixed

<snip>
And the simple act of imagining how a prepared statement could possibly
be halfway-practical for making SQL mimic the behavior of RLA when
absolutely nothing about the file is known at compile-time makes my
brain hurt.
</snip>

I tend to think the opposite. Having to create all the logicals and
whatnot to do a variety of Order By's, Where's, etc using RLA versus how
easy it is to do with SQL makes my head hurt.

Many of us, when faced with this problem in SQL tend to prepare statements
like this
where
(colA between ? and ?) and
(colB between ? and ?) and
...
And the variables can be quite flexible. High values, low values, The
same, for example
execute stmt using :RpgVar1, :RpgVar2, :RpgVar3...
if you want an equal there's nothing stopping you from having RpgVar1 set
to RpgVar2

See prepare statement, execute
in the Infocenter.


Rob Berendt





Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot COM and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available here. If you have questions about this, please contact