Custom Object Types
From: Dom (dom_at_nospam.it)
Date: 02/15/05
- Next message: Frank Ratzlow: "Re: simple sql query, but don't get it ..."
- Previous message: Symon: "Re: code to collect mails and store to database"
- Next in thread: Chuck Simpson: "Re: Custom Object Types"
- Reply: Chuck Simpson: "Re: Custom Object Types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 15 Feb 2005 10:11:28 GMT
Hi to all,
I have a PLSQL package containing 2 methods: get_account and set_account.
The former returns an Account type, the latter accepts an Account type.
Account TYPE is defined as %ROWTYPE of an Account Table contained inside DB.
This is the PLSQL package:
CREATE OR REPLACE PACKAGE test AS
SUBTYPE Account IS MEMBERSHIP.ACCOUNT%ROWTYPE;
PROCEDURE get_account (
p_username VARCHAR2,
p_password VARCHAR2,
p_account OUT Account,
return_code OUT NUMBER);
PROCEDURE set_account (
p_account IN Account,
return_code OUT NUMBER);
END;
/
Now I want to call these 2 procedures from a java program via a callable
statement....
what is the best approach to deal with Account type?
I have a Java Bean Account.java describing Account type....
I have read that there are 2 approaches: one based on oracle.sql.STRUCT and
the other based on java.sql.SQLData....
If my Account.java also implements java.sql.SQLData, does not match JavaBean
pattern anymore?
Thanks for any advice, link and code examples
Dom
- Next message: Frank Ratzlow: "Re: simple sql query, but don't get it ..."
- Previous message: Symon: "Re: code to collect mails and store to database"
- Next in thread: Chuck Simpson: "Re: Custom Object Types"
- Reply: Chuck Simpson: "Re: Custom Object Types"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|