You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jonathan E Bricker <BR...@LILLY.COM> on 2005/05/12 16:29:02 UTC
[dbUtils] - QueryRunner question
I'm getting an SQLException with
QueryRunner.update(Connection,String,Object[]) method and I wanted to see
if I was doing this correctly.
My values for the insert come from a ValueObject. All of the fields are
Strings EXCEPT informed_consent_date which is a date and Patient_Id which
is a BigDecimal. Patient_ID is null because there is a trigger that will
fill that field.
I take my fields in the VO and put them in an ArrayList then use
toArray(Object[]) to get them into the array.
When I use the method I get an InvalidColumn. I suspect that this is the
Date fields not matching or getting translated correctly. Any ideas would
be helpful.
SQLException = Invalid column type Query: insert into ATD_PATIENT
(PATIENT_ID,GENDER_CODE,BIRTH_YEAR,INFORMED_CONSENT_DATE,ENCRYPTED_EXTERNAL_ID,RACIAL_GROUP,SPECIES,COLLABORATION,USER_1_USER_ID)
VALUES(?,?,?,?,?,?,?,?,?) Parameters: [null, M, 1965, 2005-05-05,
auDcPckKiXAkFpzwGHqFYaqPdgI, White, Human, IU, 11]
Jonathan Bricker
Lilly Research Labs