Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #16155

Re: JDBC, PreparedStatement and named parameters

Path csiph.com!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From markspace <-@.>
Newsgroups comp.lang.java.programmer
Subject Re: JDBC, PreparedStatement and named parameters
Date Fri, 20 Jul 2012 09:37:25 -0700
Organization A noiseless patient Spider
Lines 36
Message-ID <juc1g8$olu$1@dont-email.me> (permalink)
References <slrnk0i9rb.u9l.avl@gamma.logic.tuwien.ac.at> <jubmj6$ip8$1@dont-email.me> <slrnk0is4j.u9l.avl@gamma.logic.tuwien.ac.at> <jubsm4$o36$1@dont-email.me> <slrnk0j1lf.u9l.avl@gamma.logic.tuwien.ac.at>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Fri, 20 Jul 2012 16:37:28 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="61282af8d6595e8d991edb5ac03d6e00"; logging-data="25278"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18nEWGEZlgRrHTBJ+UKNqrocvRxqlbIJtU="
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0
In-Reply-To <slrnk0j1lf.u9l.avl@gamma.logic.tuwien.ac.at>
Cancel-Lock sha1:BcK0ed8cI7PKbOo/p2fNjTi03GA=
Xref csiph.com comp.lang.java.programmer:16155

Show key headers only | View raw


On 7/20/2012 9:26 AM, Andreas Leitgeb wrote:
> markspace <-@> wrote:
>> On 7/20/2012 7:52 AM, Andreas Leitgeb wrote:
>>> My question was a bit more specific than just about how to use
>>> parameters at all.  Rather, it was about how to de-couple the
>>> exact shape of the where-clause from the array of parameters
>>> that provides the variable parts.
>>> Now, do Apache DbUtils really address this?
>> I don't understand the word "shape" when applied to parsing, databases,
>> or Java.
>
> Thanks for trying to help, anyway.


Here's a hint: when you post asking for help making something work like 
<insert non-Java system here>, most of us are going to have no idea what 
you are really asking for.

Personally, the more I think about it, the more I think having a second 
layer of binding that you have to deal with is going to be a bigger pita 
than just using indexes.  That jdbcUtils package I pointed you at made 
it very easy to do that, if you'd bothered to read the documentation 
further than just noticing the question marks in the SQL statements.

I've had MyBatis recommended to me when I asked a similar question.  I 
haven't looked at it, but a quick review of their user guide looks like 
it has some sort of bindings available by name/property.

Stuff is out there, but "works like X" isn't going to help anyone who 
isn't familiar with X.  I certainly can't read your mind, or develop 
requirements just by staring at the word "X".




Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-20 09:39 +0000
  Re: JDBC, PreparedStatement and named parameters markspace <-@.> - 2012-07-20 06:31 -0700
    Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-20 14:52 +0000
      Re: JDBC, PreparedStatement and named parameters markspace <-@.> - 2012-07-20 08:15 -0700
        Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-20 16:26 +0000
          Re: JDBC, PreparedStatement and named parameters markspace <-@.> - 2012-07-20 09:37 -0700
            Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-20 21:04 +0000
              Re: JDBC, PreparedStatement and named parameters markspace <-@.> - 2012-07-20 14:12 -0700
                Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-20 22:35 +0000
                Re: JDBC, PreparedStatement and named parameters markspace <-@.> - 2012-07-20 16:08 -0700
                Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-21 14:32 +0000
                Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-24 16:18 +0000
            Re: JDBC, PreparedStatement and named parameters Arne Vajhøj <arne@vajhoej.dk> - 2012-07-20 22:13 -0400
  Re: JDBC, PreparedStatement and named parameters Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-07-20 10:22 -0700
    Re: JDBC, PreparedStatement and named parameters Lew <lewbloch@gmail.com> - 2012-07-20 11:00 -0700
  Re: JDBC, PreparedStatement and named parameters Arne Vajhøj <arne@vajhoej.dk> - 2012-07-20 22:11 -0400
    Re: JDBC, PreparedStatement and named parameters Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-07-21 14:47 +0000
      Re: JDBC, PreparedStatement and named parameters jebblue <n@n.nnn> - 2012-07-23 22:14 -0500
        Re: JDBC, PreparedStatement and named parameters jebblue <n@n.nnn> - 2012-07-23 22:19 -0500
  Re: JDBC, PreparedStatement and named parameters Roedy Green <see_website@mindprod.com.invalid> - 2012-07-21 15:00 -0700
    Re: JDBC, PreparedStatement and named parameters Arne Vajhøj <arne@vajhoej.dk> - 2012-07-21 21:53 -0400

csiph-web