getDBTransaction [message #317945] |
Mon, 05 May 2008 01:32 |
shyamvyas
Messages: 2 Registered: May 2008
|
Junior Member |
|
|
I am new to jdev, i was trying to write code in which a plsql function would return some value. following code is giving me error during compilation.
public String getpassword(String usercode,String password) {
String result ;
CallableStatement plsqlBlock=null ;
String statement = "BEGIN :1 =getpassword(:2) ; END;" ;
plsqlBlock = getDBTransaction().createCallableStatement(statement,0) ;
try {
plsqlBlock.registerOutParameter(1,OracleTypes.VARCHAR);
plsqlBlock.setString(2,usercode) ;
plsqlBlock.execute() ;
result=plsqlBlock.getString() ;
return result ;
} catch (SQLException e) {
// TODO
}
}
---
the error messages are
Error(87,19): method does not return a value
Error(91,22): method getDBTransaction() not found in class app2.view.backing.Login
Error(93,47): identifier OracleTypes not found
Error(96,30): method getString() not found in interface java.sql.CallableStatement
---
what should we do to use getDBTransaction().
pls help me.
shyam
|
|
|
Re: getDBTransaction [message #317962 is a reply to message #317945] |
Mon, 05 May 2008 02:21 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
From which class do you call this getDBTransaction()? You did use ApplicationModuleImpl as superclass, didn't you?
CallableStatement.getString() does not exist. There's only a version with an int as parameter or a String as parameter.
[Updated on: Mon, 05 May 2008 02:26] Report message to a moderator
|
|
|
Re: getDBTransaction [message #317981 is a reply to message #317962] |
Mon, 05 May 2008 03:44 |
shyamvyas
Messages: 2 Registered: May 2008
|
Junior Member |
|
|
Thanks for reply, Frank
I had come across getDBTransaction() while referring the book "oracle jdeveloper 10g for forms and plsql developers" by peter koletzke.
it says the method getDBTransaction() refers to a transaction object. it says it is the getter method.
I have rectified some of the errors, but am still getting the following error during compilation.
Error(93,22): method getDBTransaction() not found in class app2.view.backing.Login
|
|
|
|