Home » Developer & Programmer » JDeveloper, Java & XML » getDBTransaction (10.1.3.3.0)
getDBTransaction [message #317945] Mon, 05 May 2008 01:32 Go to next message
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 Go to previous messageGo to next message
Frank
Messages: 7877
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 Go to previous messageGo to next message
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

Re: getDBTransaction [message #318029 is a reply to message #317981] Mon, 05 May 2008 06:42 Go to previous message
Frank
Messages: 7877
Registered: March 2000
Senior Member
What class does your Login extend?

Do you understand Java?
Previous Topic: Error while running OA Framework page in Jdeveloper
Next Topic: JSP file must reside in server main directory or directory beneath it.
Goto Forum:
  


Current Time: Tue Sep 02 00:39:05 CDT 2014

Total time taken to generate the page: 0.10211 seconds