on 11-06-2007 10:48 AM
Hi
Experts
I am trying to receive a date from a table.
but getting error.
<b><i>java.sql.SQLException: ORA-00904: "TODATE": invalid identifier </i></b>
code is given below.
try
{
Statement stmt=wdContext.currentContextElement().getStmt();
ResultSet rs=stmt.executeQuery("select boss_comment,emp_comment,city,empname,designation,fromdate,todate,no_of_persons from grequest r,g_temp e where status='n' and r.empid=e.empid "); // select statment
wdComponentAPI.getMessageManager().reportException("After Rs execution",false);
while(rs.next())
{
IPrivateRequestTable.IRequestElement req=wdContext.createRequestElement();
req.setBossComment(rs.getString("boss_comment"));
req.setEmpComment(rs.getString("emp_comment"));
req.setCity(rs.getString("city"));
req.setEmployee(rs.getString("empname"));
req.setDesignation(rs.getString("Designation"));
req.setFromDate(rs.getDate("FromDate"));
req.setToDate(rs.getDate("ToDate"));
req.setNoOfPersons(rs.getInt("no_of_persons"));
wdContext.nodeRequest().addElement(req);
}
}
catch(Exception ex)
{
wdComponentAPI.getMessageManager().reportException(ex.toString(),false);
System.out.println("Error");
}
Please Reply.....
Hi Sunny,
Just check the identifier u r getting in result set. i think its just a spelling mistake .
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunny
Check in your backend talbe, TODATE column name,it must be some other name
Regards
Chaitanya.A
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
TODATE is a keyword in Oracle. Pl try to avoid the usage of any keywords as column names.
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.