[Oracle] "CREATE JAVA SOURCE" via ODBC?

Discussion in 'Java' started by Wojciech Maruszek, Sep 27, 2003.

  1. Hello,

    I have an Oracle 9 database with ODBC drivers.
    I want to create a Java stored procedure.
    I have written the following statement:

    CREATE JAVA SOURCE NAMED SimpleClass AS
    public class SimpleClass
    {
    public static int is_positive(int number) {
    return (number >= 0) ? 1 : 0;
    }
    }

    The problem is that curly braces {} and question mark ?
    have special meaning for ODBC. My statement executes correctly
    when I switch to other drivers (like OCI). To make it work
    properly under ODBC, I have to modify Java source
    (e.g. replace ? : clauses with if's).

    Unfortunately, I have to stay with ODBC drivers.
    How to solve the problem?
     
    Wojciech Maruszek, Sep 27, 2003
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael J. Moore

    ODBC to Oracle (data source name not found)

    Michael J. Moore, Jul 21, 2003, in forum: Python
    Replies:
    0
    Views:
    1,478
    Michael J. Moore
    Jul 21, 2003
  2. Nagendra
    Replies:
    0
    Views:
    331
    Nagendra
    Sep 29, 2004
  3. Nagendra
    Replies:
    3
    Views:
    407
    Benji York
    Sep 30, 2004
  4. Replies:
    4
    Views:
    670
    Grig Gheorghiu
    Nov 10, 2005
  5. Replies:
    5
    Views:
    672
  6. Godzilla
    Replies:
    9
    Views:
    639
    Godzilla
    Mar 23, 2007
  7. Wes Gamble
    Replies:
    1
    Views:
    347
    Gerardo Santana Gómez Garrido
    Apr 5, 2006
  8. Feyruz
    Replies:
    4
    Views:
    3,101
    Sherm Pendley
    Oct 14, 2005
Loading...