Re: How to submit Oracle Requests through Java




"Wibble" wrote...
> bhanu wrote:

>> I am new to Java. I am trying to submit a Oracle Apps Concurrent
>> Request from Java. I tried something given below:
>>
>>
>> Class.forName("oracle.jdbc.driver.OracleDriver");
>>
>> // Step 2. Create a Connection object
>> Connection con = DriverManager.getConnection(
>> "jdbc:oracle:thin:@hdqofd:1541:ITPJ",
>> "apps", "ksl_apps");
>> System.out.println("got connection for item cost correction;" );
>> // Step 3. Create a Statement object and call its executeUpdate
>> // method to insert a record
>> Statement s = con.createStatement();
>> String sql = "";
>> sql =
>> "FND_REQUEST.SUBMIT_REQUEST('PO','REQIMPORT',NULL,NULL,FALSE,'NOTES',NULL,
>> 'BUYER', NULL, 'No', 'Yes')";
>> s.executeQuery(sql);
>>
>> I dont know how to do it exactly and when I try to run this it is
>> throwing "java.sql.SQLException: ORA-00900: invalid SQL statement"
>> exception.
>> Please let me know how to solve this.
>>
>> regards
>> Kumar
>>
> use "{ call PKG.PROC(...) }", not "PKG.PROC(...)"
> if its a procedure.


And use...

s.execute(sql);

instead of...

s.executeQuery(sql);


// Bjorn A



.



Relevant Pages

  • Re: jsp client for axis2 webservice
    ... Read the Java EE tutorial on the Sun web site. ... to call logic from a JSP. ... all the JSP does is POST an HTTP request to the application ... calling one of the stub methods that you have. ...
    (comp.lang.java.programmer)
  • Re: Servlet To Java Application Communication
    ... I would like to write a Java servlet that it will be able to ... way to communicate with a servlet. ... probably know you should encode the request XML in the body part of a POST ... and expect the response XML in the response content. ...
    (comp.lang.java.databases)
  • making Lisp faster by giving it 40 more bits (was: Wasting Time)
    ... > My expectation was for larger values from waste-time. ... > is comparable to bignum assignment rather than to the bignum compare. ... > thread per request is the better model. ... If you try this in Java you will get an execution speed which is 50-80 ...
    (comp.lang.lisp)
  • Re: Connecting to Analysis Services with Java XML
    ... Most likely your element isn't in the correct namespace. ... Compare your Java request to the VB request and see the difference... ... public static void main(String[] args) throws Exception { ...
    (microsoft.public.data.xmlanalysis)
  • Re: jsp client for axis2 webservice
    ... Read the Java EE tutorial on the Sun web site. ... It talks generally about how to call logic from a JSP. ... A servlet on the app server receives the request, parses out the request parameters, and passes them along to an instance of a regular Java class, usually a Bean. ... That object in turn will perform some processing, say, calling one of the stub methods that you have. ...
    (comp.lang.java.programmer)