Re: How to submit Oracle Requests through Java
- From: "Bjorn Abelli" <bjorn_abelli@xxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 30 May 2005 21:10:38 +0200
"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
.
- References:
- How to submit Oracle Requests through Java
- From: bhanu
- Re: How to submit Oracle Requests through Java
- From: Wibble
- How to submit Oracle Requests through Java
- Prev by Date: RuntimeExceptions with Struts
- Next by Date: Re: Java vs. C++
- Previous by thread: Re: How to submit Oracle Requests through Java
- Next by thread: Applet paint problem (only on IE)
- Index(es):
Relevant Pages
|
|