Calling Stored Procedure w/JPublisher generated classes
Hi,
We are trying to pass Oracle nested tables as input/output parameters to several of our stored procedures to support bulk binding operations in the database from our applications. We have some database defined types and stored procedures that use these as input/output parameters which have been tested and working at the database level. I managed to get JPublisher to create these classes and compile fine, but I am not sure exactly how to register these classes as parameters with the stored procedure Java call. Any assistance is appreciated.
Here is a sample of the db types/procedures:
TYPE USER_APP_TYPE IS OBJECT
User_ID VARCHAR2(50), -- input fields
App_ID VARCHAR2(50),
App_Type VARCHAR2(50),
App_Obj_ID VARCHAR2(50),
Status VARCHAR2(30), -- output fields
Desc_String VARCHAR2(255),
Comments VARCHAR2(255)
TYPE USER_APP_LIST IS TABLE OF USER_APP_TYPE;
CREATE OR REPLACE
PACKAGE BODY PKG_MOD_BULK
AS
PROCEDURE LOOKUPAPPBYUSER_BULK(
p_InOutRS IN OUT USER_APP_LIST)
IS
BEGIN
... do work - fill in output fields ...
END LOOKUPAPPBYUSER_BULK;
END PKG_MOD_BULK;So using JPublisher 3 classes were generated with constructors and getter/setter methods:
UserAppType.java
UserAppTypeRef.java
UserAppList.java
My consumer POC code looks like this:
public class BulkBindingDemo
@SuppressWarnings("CallToThreadDumpStack")
public static void main(String[] args)
Connection conn = null;
try
String UserName = "user";
String Password = "pass";
// Load JDBC driver
Class.forName("oracle.jdbc.OracleDriver");
conn = DriverManager.getConnection("jdbc:oracle:thin:@mydatabse.com:1521:mysid", UserName, Password);
// Create instances of custom database UDT classes.
UserAppList myAppList = new UserAppLicList();
UserAppType[] myAppArr = new UserAppType[2];
// Populate UDTs
myAppArr[0] = new UserAppType("bob" ,"acct","fiscal","1FG452ABC",null,null,null,null,null,null,null);
myAppArr[1] = new UserAppType("joe","hr","benefits","89JTYG671",null,null,null,null,null,null,null);
myAppList.setArray(myAppArr);
// Not sure how to set parameter as input/output.
CallableStatement cs = conn.prepareCall("BEGIN MY_SCHEMA.PKG_MOD_BULK.LOOKUPAPPBYUSER_BULK(?); END;");
cs.setObject("p_InOutRs", myAppLicList);
cs.execute();
ResultSet rs = cs.getResultSet();
// Get results - null fields from above should be populated
if (rs.first())
myAppList = (UserAppList)rs.getObject("p_InOutRs");
myAppArr = myAppList.getArray();
System.out.println("status: " + myAppArr[0].getStatus());
System.out.println("desc str: " + myAppArr[0].getDescString());
System.out.println("comments: " + myAppArr[0].getComments());
// additional fields here..
//MyObject[] myObjectAry = (MyObject[])p_myObjectArray.getArray();
//cs.registerOutParameter(1,Types.CHAR);
catch (Exception e)
e.printStackTrace();
finally
if (conn != null)
try { conn.close(); }
catch (Exception e) {}
}So this code will compile and run up to the stored procedure call itself, but I'm not sure how to set the parameters for in/out with these generated classes. Any ideas?
Anyone? Still haven't figured this one out...
Similar Messages
-
Creation of DB Adaptert for calling stored procedure in MS SQL server
Hi,
I need to create a DB adapter to call a stored procedure in MS SQL Server.
I have gone thru the thread MS SQL Server database connection
It mentions that we need to use a command line utility for generating the wsdl and xsd for calling stored procedures in MS SQL server. Please provide information where to find this utility and how to use it.
Any links to tutorials are welcome.
Thanks !!.
Silas.Command line is required for stored procedures, if you are using the basic options you don't need to worry.
(1) Download MS SQL Server 2005 JDBC Driver from Microsoft Site. http://msdn.microsoft.com/en-us/data/aa937724.aspx
(2) The download is self extracting exe file. Extract this into Program Files on your machine. It should create folder as "Microsoft SQL Server 2005 JDBC Driver"
(3) In above mentioned folder search for sqljdbc.jar copy this file into JDeveloper\JDBC\lib folder.
(4) Open JDeveloper/jdev/bin/jdev.conf file add following entry.
AddJavaLibPath C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib
While executing this step make sure that your JDeveloper is closed.
(5) On command prompt go to J Developer folder and execute following command
jdev -verbose
This will open JDeveloper.
(6) Now go to JDeveloper > Connections > Database Connections > New Database Connection
(7) Select Third Party JDBC
(8) Specify MS Sql Server User Name, password and Role.
(9) In connection page specify following
- Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver
- For class path browse to C:/Program files/Microsoft SQL Server 2000 Driver for JDBC/lib folder, select sqljdbc.jar add it as library.
- Specify URL as following.
jdbc:sqlserver://SERVERNAME:1433;databaseName=MSSQLDBNAME;
(10) Go to Test page and test it.
cheers
James -
How to call Stored Procedure in OWB?
Hi,
I'm not able to call stored procedures in the OWB. There are transformations available to call the functions namely Mapping Transformation, but i didnt find any such transformation for stored procedures.
I was able to validate, generate ad deploy the stored procedure, but coudn't find any trasnformation which calls the stored procedure.
And my source and the target are in the same schema, hence a connector module is also not needed.
Can anyone help me in this regard and explain how to call a stored procedure in the Oracle Warehouse Builder?Hi Patrick,
Thanks a lot for your reply.
Hey Patric, sorry to bug you again.
Regarding calling the Stored procedure, mine is a very simple scenario.
I have created a table with two fields say A and B. My stored proc takes an input A1. The stored proc then selects the B field from that table when A1 has the same value as A.
Then i check the condition, if the selected value is null then set the output variable to 'N'. Else to 'Y'.
The logic that i'm following in OWB is:
1.) create a mapping which contains the source as a table.
2.) Give the field A in that table as an input to the Stored procedure which i can have it my Mapping Trasformation.
3.) Then i need to specify the condition that the field A in the table should be equal to A1. And if equal, then fetch the value from the table and display either 'Y' or 'N' based on the condition that is checked in the Procedure.
But the problem here i'm facing is that,i'm not able to store the output into a file, since the procedure doesnot return a value. And my target is a file.
should i need to change my logic.
Regards,
Abhinav. -
How to call stored procedure in hibernate
hi ,
can any one help me how to call stored procedure in hibernate.Given code in hbm.xml
and also plz tell me what is the use of <return-property/>in given hbm.xml file.
<sql-query name="selectEmployees_SP" callable="true">
<return alias="emp" class="com.centris.Employee">
<return-property name="eno" column="eno"/>
<return-property name="ename" column="ename"/>
<return-property name="address" column="address"/>
<return-property name="salary" column="salary"/>
{ ? = call p_retrieve_employees() }
</return>
</sql-query>Hi,
Your question isn't related to Java Programming and should be asked in a [Hibernate forum|http://forum.hibernate.org/]
Kaj -
How to call stored procedure having parameter as oracle type from java???
Hello,
I have created following type & stored procedure in oracle. How can i call this stored procedure from my java class?
I want to pass 2d array to this procedure.
CREATE OR REPLACE TYPE type_survey AS OBJECT ( emp_id number,emp_name varchar(100));
CREATE OR REPLACE TYPE tbl_survey AS VARRAY(100) OF type_survey;
CREATE OR REPLACE PROCEDURE INSERTEMP (pp in tbl_survey)
IS
BEGIN
FOR I IN pp.FIRST .. pp.LAST
LOOP
INSERT INTO SURVEY (id) VALUES (pp(I).emp_id);
END LOOP;
END;
/CREATE OR REPLACE TYPE type_survey AS OBJECT ( emp_id number,emp_name varchar(100));
CREATE OR REPLACE TYPE tbl_survey AS VARRAY(100) OF type_survey;
CREATE OR REPLACE PROCEDURE APP_DATA.INSERTEMP (pp in tbl_survey,result out varchar)
IS
BEGIN
FOR I IN pp.FIRST .. pp.LAST
LOOP
INSERT INTO SURVEY (id) VALUES (pp(I).emp_id);
END LOOP;
result:='done';
END;
public static void passArray() throws SQLException
Connection conn=null;
try{
conn=getOracleConnection();//this method returns connection object
catch (Exception e)
e.printStackTrace();
String[][] val=new String[2][2];
* val[0][0]="1";*
* val[0][1]="aaa";*
* val[1][0]="2";*
* val[1][0]="bbb";*
StructDescriptor desc1=StructDescriptor.createDescriptor("TYPE_SURVEY",conn);
STRUCT p1struct1 = new STRUCT(desc1,conn,_val_); *//showing error at this line*
ArrayDescriptor arraydesc = ArrayDescriptor.createDescriptor("TBL_SURVEY",conn);
ARRAY array = new ARRAY(arraydesc,conn,*p1struct1*);
CallableStatement cstmt = conn.prepareCall("{ call INSERTEMP(?,?)}");
cstmt.setObject(1,array);
cstmt.registerOutParameter(2, OracleTypes.VARCHAR);
cstmt.execute();
String res=cstmt.getString(2);
System.out.println(res);
in the above java code, I have passed 2d array of string to STRUCT constructor and passed STRUCT object i.e. p1struct1 to ARRAY constructor. is it correct? that means @bottom line, I want to pass val array to my stored porcedure. How can i do this? above code is showing following error......
Exception in thread "main" java.sql.SQLException: Fail to convert to internal representation: [Ljava.lang.String;@146c1d4
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.oracore.OracleTypeNUMBER.toNUMBER(OracleTypeNUMBER.java:540)
at oracle.jdbc.oracore.OracleTypeNUMBER.toDatum(OracleTypeNUMBER.java:54)
at oracle.sql.StructDescriptor.toOracleArray(StructDescriptor.java:717)
at oracle.sql.StructDescriptor.toArray(StructDescriptor.java:1375)
at oracle.sql.STRUCT.<init>(STRUCT.java:159)
at com.flologic.ArrayDemo.passArray(ArrayDemo.java:29)
at com.flologic.ArrayDemo.main(ArrayDemo.java:57) -
JDBC performance calling stored procedures
Hi,
We have an java application which makes calls to PL/SQL stored procedures. We have one 'database server' component which handles all the database interaction, and other components which connect to it using CORBA.
The problem is that with everything running, certain queries are taking from 17 to 30 seconds to come back, but when you run the same sql from SQLPlus, you get the results back in about 2 seconds every time.
We're using a connection pool, but this doesn't seem to be the problem, as we put in diagnostics and it takes no time at all to get a free connection.
The time is taken up doing a getCursor() to get the result set back. We register the cursor as an output parameter, and open it from within the stored procedure.
Anyone any suggestions?
Thanks,
Neil.
nullHi ,
You can call stored procedure using JPA (eclipselink API).Below is the sample code
ReadAllQuery readAllQuery = new ReadAllQuery(Employee.class);
call = new StoredProcedureCall();
call.setProcedureName("Read_All_Employees");
readAllQuery.useNamedCursorOutputAsResultSet("RESULT_CURSOR");
readAllQuery.setCall(call);
List employees = (List) session.executeQuery(readAllQuery);
Regards,
Vinay -
Without calling stored procedure or functions from database
Hi,
I am using Jdeveloper 11.1.1.5.0.
=>How to do PL/SQL procedures and functions in ADF without calling stored procedure or function from DB?S, PL/SQL procedures and functions are done in Application Module class or in managed bean..By calling the stored procedures or functions from DB.
But I am asking how to do if DB doesn't have any procedures,triggers and functions. -
Calling stored procedures in Sybase from java
Hi,
I am using the following stored procedure in Sybase
use xyzdb
go
-- drop procedure if it already exist
if object_id('up_name_select') is not null
begin
drop procedure up_name_select
end
go
create procedure up_name_select
@zid numeric(7,0),
@firstname char(40),
@lastname char(40)
as
select zid,
firstname,
lastname
from name
where zid = @zid or
(lastname like @lastname or firstname like @firstname)
go
-- update documentation records in object_docs
delete object_docs
from object_docs
where object_name = "up_name_select"
go
insert into object_docs values("up_name_select","Selects records from the name table based upon the values of the input parameters.")
go
-- update documentation records in column_docs
delete column_docs
from column_docs
where object_name = "up_name_select"
go
insert into column_docs values("up_name_select","@zid","System generated ID for an individual contact.")
insert into column_docs values("up_name_select","@firstname","First name of the contact. SQL wild card characters are accepted.")
insert into column_docs values("up_name_select","@lastname","Last name of the contact. SQL wild card characters are accepted.")
go
-- print success message and grant permissions
if object_id('up_name_select') is not null
begin
print "Procedure up_name_select created."
grant execute on up_name_select to developer_role
end
go
This stored procedure selects the values from the table "name" for a given where condition (if I am not wrong).
Can any one give me sample java code to select the records from the table "name" for a given zid.
Thankyou in advance.
Regards
sgatl2calling stored procedures from java
here is the sample code
CallableStatement cs = con.prepareCall("{call selectlogin (?)}");
cs.setString (1, "value");
ResultSet rs = cs.executeQuery ();
while (rs.next ())
//your code for display
} more on gooooooogle
http://www.google.com/search?q=calling+stored+procedures+from+java+with+sample+example&client=netscape-pp&rls=com.netscape:en-US -
Java call stored procedure with nested table type parameter?
Hi experts!
I need to call stored procedure that contains nested table type parameter, but I don't know how to handle it.
The following is my pl/sql code:
create or replace package test_package as
type row_abc is record(
col1 varchar2(16),
col2 varchar2(16),
col3 varchar2(16 )
type matrix_abc is table of row_abc index by binary_integer;
PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
p_arg2 IN VARCHAR2,
p_arg3 IN VARCHAR2,
p_out OUT matrix_abc
END test_package;
create or replace package body test_package as
PROCEDURE test_matrix(p_arg1 IN VARCHAR2,
p_arg2 IN VARCHAR2,
p_arg3 IN VARCHAR2,
p_out OUT matrix_abc
IS
v_sn NUMBER(8):=0 ;
BEGIN
LOOP
EXIT WHEN v_sn>5 ;
v_sn := v_sn + 1;
p_out(v_sn).col1 := 'col1_'||to_char(v_sn)|| p_arg1 ;
p_out(v_sn).col2 := 'col2_'||to_char(v_sn)||p_arg2 ;
p_out(v_sn).col3 := 'col3_'||to_char(v_sn)||p_arg3 ;
END LOOP ;
END ;
END test_package ;
My java code is following, it doesn't work:
Class.forName ("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection
("jdbc:oracle:thin:@10.16.102.176:1540:dev", "scott", "tiger");
con.setAutoCommit(false);
CallableStatement ps = null;
String sql = " begin test_package.test_matrix( ?, ? , ? , ? ); end ; ";
ps = con.prepareCall(sql);
ps.setString(1,"p1");
ps.setString(2,"p2");
ps.setString(3,"p3");
ps.registerOutParameter(4,OracleTypes.CURSOR);
ps.execute();
ResultSet rset = (ResultSet) ps.getObject(1);
error message :
PLS-00306: wrong number or types of arguments in call to 'TEST_MATRIX'
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored
Regards
LouisLouis,
If I'm not mistaken, record types are not allowed. However, you can use object types instead. However, they must be database types. In other words, something like:
create or replace type ROW_ABC as object (
col1 varchar2(16),
col2 varchar2(16),
col3 varchar2(16 )
create or replace type MATRIX_ABC as table of ROW_ABC
/Then you can use the "ARRAY" and "STRUCT" (SQL) types in your java code. If I remember correctly, I recently answered a similar question either in this forum, or at JavaRanch -- but I'm too lazy to look for it now. Do a search for the terms "ARRAY" and "STRUCT".
For your information, there are also code samples of how to do this on the OTN Web site.
Good Luck,
Avi. -
Calling Stored Procedure(takes varray of objects as input) from jdeveloper
How can i call Stored Procedure which takes varray of objects as input from jdeveloper
My object is :
TYPE Entry IS Object (
Name VARCHAR2(1024),
Value VARCHAR2(1024)
& the varray is :
TYPE EntryArr IS varray(10) OF Entry ;
& the procedure is :
PROCEDURE myProc( myEntryArr IN EntryArr )
AS
s varchar2(1024);
BEGIN
for i in 1.. myEntryArr .COUNT loop
if myEntryArr(i).Name = 'Name1' then
s := myEntryArr(i).Value
end loop;
end;hi 429071
Maybe you can find some useful information in:
"Oracle Database Java Developer's Guide"
http://download-west.oracle.com/docs/cd/B14117_01/java.101/b12021.pdf
see "6 Publishing Java Classes With Call Specs" > "Writing Object Type Call Specs"
success
Jan Vervecken -
How to call store procedure in query generator
Hi All,
How to call store procedure in query generator.
Regards
Rajkumar Gupta
Edited by: Rajkumar Gupta on Dec 7, 2010 2:11 AMHi,
Please check the following threads.
How to use Stored Procedure in sap business one
How to add parameters to a stored procedure in B1 Query generator
How to execute the procedure in sap b1
Hope it helps,
Vasu Natari. -
How to call stored procedures from java program?
I have tried to run a program that calls a stored procedure on MySQL
server version 5.0.17 by using connector/j 5.0, but it always fails on the
statement: con.preparecall() ,
have looked on the internet and found out that people can all mysql
stored procedure all right in their programs, really dont know what's
wrong with this small peiece of code:
import java.sql.*;
public class TestDB {
// procedure being called is:
CREATE PROCEDURE `dbsaystorm`.`getsite` ()
BEGIN
select name from tblsite;
END
public static void main(String[] args) {
try {
//Class.forName("org.gjt.mm.mysql.Driver");
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:mysql://localhost/dbname",
"user", "pwd");
* executing SQL statement here gives perfect correct results:
// PreparedStatement ps = con.prepareStatement("select name from tblsite");
// ResultSet rs =ps.executeQuery();
// but in stored procedure way...
//it fails here on this prepare call statement:
CallableStatement proc = con.prepareCall("call getsite()");
ResultSet rs =proc.executeQuery();
if (rs == null) return;
while (rs.next()){
System.out.println("site name is: "+ rs.getString(1));
rs.close();
} catch (SQLException e) {e.printStackTrace();}
catch (Exception e) {e.printStackTrace();}
}it always gives this exception:
java.lang.NullPointerException
at com.mysql.jdbc.StringUtils.indexOfIgnoreCaseRespectQuotes(StringUtils.java:959)
at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:1280)
at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:3668)
at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:638)
at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:453)
at com.mysql.jdbc.Connection.parseCallableStatement(Connection.java:4365)
at com.mysql.jdbc.Connection.prepareCall(Connection.java:4439)
at com.mysql.jdbc.Connection.prepareCall(Connection.java:4413)
at saystorm.server.data.database.TestDB.main(TestDB.java:29)
where have I gone wrong?
when I commented out the statement that makes the procedure call and call preparedstatement to execute SQL select statement, it gave perfectly correct result.
it looks like there is no problem with java prog accessing MYSQL server database, but the it seems that it's just java can't call stored procedure stored on the mysql server version 5.
can it or can't it? if it can, how is that accomplished?It is a bug in the driver because it shouldn't be
returning that exception (null pointer) even if you
are doing something wrong.
Are you using the latest version of the driver?
The stored procedure runs when you run it from the
gui/command line using a MySQL tool - correct?
As suggested you should be using the brackets. What
is the data type of the 'name' field?
You could try returning another value like one of the
following
select 1, name from tblsite;
select name, 1 from tblsite;
That might get around the bug
Additionally try just the following...
select 'test' from tblsite;yes, the driver used is in connector/j 5.0--the lastest one, and the
procedure can run correctedly at either command line or GUI mode
with no problem whatsoever, the returned data type is string type,
I have not got the chance to test it again with those values you
suggested, as I have abandoned the laptop I used to write that code
initately. There have been some other really weird cases happened on
that computer. I guess that must be something wrong with the JVM
installed on it, it was upgraded from jre5.0.04 to 06, and to 09.
something within hte JVM must have been messed up(the only reasonable
explanation). Because the same code runs correctly on my new laptop,
using the same environment: jvm 5.0_09, mysql 5.0.18, connector/J 5.0.
that old laptop really was a nightmare. -
Calling stored procedures from entity object and application module
Hello
I've put in place an EntiyImpl base class containg helper methods to call stored procedures.
I now need to call stored procedures from the application module.
Apart from creating an application module base class and duplicating the helper method code is there a way
to share the helper methods for calling stored procedures between the entity impl and application module impl ?
Regards
PaulDoes the helper code depend on features of a particular entity object instance, beyond its database transaction?
If so, I'm not sure I see how it could be used from an application module class.
If not, here's what you do:
Step 1:
Parametrize the database transaction--you might even want to. So instead of
protected myHelperMethod(Object someParam) {
DBTransaction trans = getDBTransaction();
change this to
protected myHelperMethod(DBTransaction trans, Object someParam) {
Step 2: make the method public and static--once you parameterize the DBTransaction, you should be able to do this.
public static myHelperMethod(DBTransaction trans, Object someParam) {
Step 3: Remove the method from your EntityImpl base class into a utility class:
public abstract class PlSqlUtils {
private PlSqlUtils() {}
public static myHelperMethod(DBTransaction trans, Object someParam) {
When you want to call the method from an application module, entity object, or even view object class, call
PlSqlUtils.myHelperMethod(getDBTransaction(), paramValue);
Unlike Transaction.executeCommand(), this lets you provide functionality like setting procedure parameter values, retrieving OUT parameter values, etc.
Hope this helps,
Avrom -
Need sample source code for calling stored procedure in Oracle
Hi.
I try to call stored procedure in oracle using JCA JDBC.
Anybody have sample source code for that ?
Regards, Arnold.Thank you very much for a very quick reply. It worked, but I have an extended problem for which I would like to have a solution. Thank you very much in advance for your help. The problem is described below.
I have the Procedure defined as below in the SFCS1 package body
Procedure Company_Selection(O_Cursor IN OUT T_Cursor)
BEGIN
Open O_Cursor FOR
SELECT CompanyId, CompanyName
FROM Company
WHERE CompanyProvince IN ('AL','AK');
END Company_Selection;
In the Oracle Forms, I have a datablock based on the above stored procedure. When I execute the form and from the menu if I click on Execute Query the data block gets filled up with data (The datablock is configured to display 10 items as a tabular form).
At this point in time, I want to automate the process of displaying the data, hence I created a button and from there I want to call this stored procedure. So, in the button trigger I have the following statements
DECLARE
A SFCS1.T_Cursor;
BEGIN
SFCS1.Company_Selection(A);
go_Block ('Block36');
The cursor goes to the corresponding block, but does not display any data. Can you tell me how to get the data displayed. In the future versions, I'm planning to put variables in the WHERE clause. -
Call stored procedure with OUT parameter
Hello,
I have created a short-lived process. Within this process I am using the "FOUNDATION > JDBC > Call Stored Procedure" operation to call an Oracle procedure. This procedure has 3 parameters, 2 IN and 1 OUT parameter.
The procedure is being executed correctly. Both IN parameters receive the correct values but I am unable to get the OUT parameter's value in my process.
Rewriting the procedure as a function gives me an ORA-01460 since one of the parameters contains XML (>32K) so this is not option...
Has someone been able to call a stored procedure with an OUT parameter?
Regards,
NicoObject is Foundation, Execute Script
This is for a query, you can change to a stored procedure call. Pull the value back in the Java code then put into the process variable.
import javax.naming.InitialContext;
import javax.sql.DataSource;
import java.sql.*;
PreparedStatement stmt = null;
Connection conn = null;
ResultSet rs = null;
try {
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:IDP_DS");
conn = ds.getConnection();
stmt = conn.prepareStatement("select FUBAR from TB_PT_FUBAR where PROCESS_INSTANCE_ID=?");
stmt.setLong(1, patExecContext.getProcessDataLongValue("/process_data/@inputID"));
rs = stmt.executeQuery();
rs.next();
patExecContext.setProcessDataStringValue("/process_data/outData", rs.getString(1));
} finally {
try {
rs.close();
} catch (Exception rse) {}
try {
stmt.close();
} catch (Exception sse) {}
try {
conn.close();
} catch (Exception cse) {}
Maybe you are looking for
-
Hi All, I have to create a box in smartform. I have used the the Box command but it is not working. Are there any parameters or conditions that need to be specified for using a box command? If we can not use a box command, then how can we create a bo
-
Hello, all. I reduced the dynamic parameter SGA_TARGET in Oracle 10.2.0.4 with the 2500M to 500M. The operation completed successfully. At the same time consumption of physical memory in the system has not decreased. Operating system AIX 5.3. Utility
-
Stacking Order of Duplicated MCs
I have a Flash piece that duplicates a random number of MovieClips (using duplicateMovieClip) and randomly places them. You can see it here: http://litmusbox.com/staging2/ Trouble is, the duplicated MCs are being placed on top of other artwork. The d
-
IPhone 4 running iOS 4.0.1 not loading images
Right so I've been an iPhone owner since the original iPhone and this is the first time I'm having this problem. It started the day I switched from iOS 4.0 to iOS 4.0.1, my iPhone 4 is taking extremely long to load images, if it does at all. It's onl
-
I want to restore my new ipad to my old ipads back up, but the back up is not listed in the drop down menu.