Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Question Unanswered: insert to in ORACLE db with JAVA - NULL strange error

    Hi my english isnt very good, but i try

    I have the next code:

    ....
    String queryString = new String(
    "INSERT INTO aplicaciones(Cod_aplicacion, Titulo, Descripcion, " +
    "Siglas, URL_externo, URL_interno, Severidad_log_min," +
    "Severidad_log_max, Severidad_mensajes_min," +
    "Severidad_mensajes_max, Notificar_error, Lista_correos, Activa)" +
    "values (null,'"+
    aLocal.getAplicacionValor() + "','" +
    aLocal.getDescripcionValor() + "','" +
    aLocal.getSiglasValor() + "','" +
    aLocal.getUrlExternoValor() + "','" +
    aLocal.getUrlInternoValor() + "'," +
    aLocal.getSvdLogMin() + "," +
    aLocal.getSvdLogMax() + "," +
    aLocal.getEnvMsgMin() +"," +
    aLocal.getEnvMsgMax() +",'" +
    aLocal.getEnvioValor() + "','" +
    aLocal.getDirValor() + "','" +
    aLocal.getActivaValor() + "')");
    st.execute(queryString);
    ....
    when i try to save with a stament i recive a error
    the error explain that i have a null valor for the Titulo Columna, but if you see my "insert to" only have a null and is the code because i drive that with a sequence in ORACLE DataBase, if i cath with a breakpoint the string value and use sqlplus to aply i have a ok result, if you have any idea please write me!!!!

  2. #2
    Join Date
    Mar 2004
    Posts
    16

    Re: insert to in ORACLE db with JAVA - NULL strange error

    You could use:

    System.out.println(queryString);

    just before the execute command, to see what you are sending to the DB. My guess is that aLocal.getAplicacionValor() the error message you get is either wrong or inaccurate. Can Cod_aplicacion be null?

  3. #3
    Join Date
    Apr 2004
    Posts
    2
    thanks for the answer but the problem wasnt with the data the problem was a java event

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •