ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gwyn Evans" <gwyn.ev...@gmail.com>
Subject Re: iBatis gives no error but no results!
Date Thu, 15 Nov 2007 09:40:40 GMT
Glad you've found what it is - Note that Larry's suggestion of TRIM()
is probably the  right one for production code though!

i.e. in the SQL, try "TRIM(T2.M_TRN_FMLY) = #family#", and just pass
the param as:
    String family = "CURR";
    params.put("family", family.trim());

/Gwyn

On 15/11/2007, lucy.foster@uk.abnamro.com <lucy.foster@uk.abnamro.com> wrote:
> Thanks Gwyn, that's done it.
>
> Regards,
> Lucy
>
>
>
>
>              "Gwyn Evans"
>              <gwyn.evans@gmail
>              .com>                                                      To
>                                        user-java@ibatis.apache.org
>              14/11/2007 17:07                                           cc
>
>                                                                    Subject
>              Please respond to         Re: iBatis gives no error but no
>              user-java@ibatis.         results!
>                 apache.org
>
>
>
>
>
>
>
>
>
> It might be that if they're set up as CHAR(5), then you might want to
> try the following...
>
> params.put(new String("family"), new String("CURR "));
> params.put(new String("group"),  new String("FXD  "));
> params.put(new String("type"),   new String("FXD  "));
>
> i.e. Pad the values you're testing against with ' 's.
>
> (I'm not 100% sure of this, as I don't use fixed CHAR fields with
> variable length data, but I've got a vauge recollection of reading
> about something similar.)
>
> /Gwyn
>
> On 14/11/2007, lucy.foster@uk.abnamro.com <lucy.foster@uk.abnamro.com>
> wrote:
> > Done some investigation - the Strings #family#, #group# and #type# are
> > setup on the Oracle db as CHAR(5) which may be causing the issue.  This a
> > proprietory db and I have no ability to change these to VARCHAR.  Is
> there
> > a workaround for this?
> >
> > Regards,
> > Lucy
> >
> >
> >
> >
> >              lucy.foster@uk.ab
> >              namro.com
> >
> To
> >              14/11/2007 15:27          user-java@ibatis.apache.org
> >
> cc
> >
> >              Please respond to
> Subject
> >              user-java@ibatis.         RE: iBatis gives no error but no
> >                 apache.org             results!
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Thanks Graeme.  It appears to be a problem with the Strings.  On
> hardcoding
> > #family#, #group# and #type# with the actual Strings but using
> > #firstContractId# and #secondContractId# as params it works.  However
> > setting the Strings as params and hardcoding the numbers for the between
> > statement it doesn't work.
> >
> > Regards,
> > Lucy
> >
> >
> >
> >
> >              Graeme J Sweeney
> >              <ibatis.user@gjsw
> >              eeney.com>
> To
> >                                        user-java@ibatis.apache.org
> >              14/11/2007 15:06
> cc
> >
> >
> Subject
> >              Please respond to         RE: iBatis gives no error but no
> >              user-java@ibatis.         results!
> >                 apache.org
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Wed, 14 Nov 2007, lucy.foster@uk.abnamro.com wrote:
> >
> > > Thanks for the suggestion but that is exactly what I did - not too
> clear
> > > I'm afraid in the last part of my email:
> >
> > <snip/>
> >
> > I thought Niels meant that you should keep 'between 12377813 and
> > 12378073' hardcoded and test the remaining fields as parameters?
> >
> > --
> > Graeme -
> >
> >
> >
> >
> ---------------------------------------------------------------------------
> > This message (including any attachments) is confidential and may be
> > privileged. If you have received it by mistake please notify the sender
> by
> > return e-mail and delete this message from your system. Any unauthorised
> > use or dissemination of this message in whole or in part is strictly
> > prohibited. Please note that e-mails are susceptible to change. ABN AMRO
> > Bank N.V, which has its seat at Amsterdam, the Netherlands, and is
> > registered in the Commercial Register under number 33002587, including
> its
> > group companies, shall not be liable for the improper or incomplete
> > transmission of the information contained in this communication nor for
> any
> > delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its
> > group companies) does not guarantee that the integrity of this
> > communication has been maintained nor that this communication is free of
> > viruses, interceptions or interference.
> >
> ---------------------------------------------------------------------------
> >
> >
> >
> >
> >
> ---------------------------------------------------------------------------
> > This message (including any attachments) is confidential and may be
> > privileged. If you have received it by mistake please notify the sender
> by
> > return e-mail and delete this message from your system. Any unauthorised
> > use or dissemination of this message in whole or in part is strictly
> > prohibited. Please note that e-mails are susceptible to change. ABN AMRO
> > Bank N.V, which has its seat at Amsterdam, the Netherlands, and is
> > registered in the Commercial Register under number 33002587, including
> its
> > group companies, shall not be liable for the improper or incomplete
> > transmission of the information contained in this communication nor for
> any
> > delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its
> > group companies) does not guarantee that the integrity of this
> > communication has been maintained nor that this communication is free of
> > viruses, interceptions or interference.
> >
> ---------------------------------------------------------------------------
> >
> >
>
>
> --
> Download Wicket 1.3.0-rc1 now! - http://wicketframework.org
>
>
>
> ---------------------------------------------------------------------------
> This message (including any attachments) is confidential and may be
> privileged. If you have received it by mistake please notify the sender by
> return e-mail and delete this message from your system. Any unauthorised
> use or dissemination of this message in whole or in part is strictly
> prohibited. Please note that e-mails are susceptible to change. ABN AMRO
> Bank N.V, which has its seat at Amsterdam, the Netherlands, and is
> registered in the Commercial Register under number 33002587, including its
> group companies, shall not be liable for the improper or incomplete
> transmission of the information contained in this communication nor for any
> delay in its receipt or damage to your system. ABN AMRO Bank N.V. (or its
> group companies) does not guarantee that the integrity of this
> communication has been maintained nor that this communication is free of
> viruses, interceptions or interference.
> ---------------------------------------------------------------------------
>
>


-- 
Download Wicket 1.3.0-rc1 now! - http://wicketframework.org

Mime
View raw message