Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Plz see this code

RaakhOct 29 2006 — edited Oct 29 2006
rs=stm.executeQuery("select news.news_id,to_char(news_date,'dd-MON-yy HH:MM:SS AM'),heading,desc1,desc2 from news where sysdate<=news_date + interval '2' day order by news_date desc");
		while(rs.next()){
		
		newsDate=rs.getString("news_date");
		out.println("News ID"+rs.getString("news_id")+"<div align=right>"+newsDate+"</div><br>");
		
		news_id=rs.getInt("news_id");
		heading=rs.getString("heading");
		out.println("<tr><td><a href=http://localhost:5050/examples/servlet/displayNews?newsID="+news_id+"><font color=olive face='times new roman' size=3><b>"+heading+"</a></font></td></tr>");			
		out.println("<tr><td>"+rs.getString("desc1")+"<a href=http://localhost:5050/examples/servlet/displayNews?newsID="+news_id+">&nbsp;&nbsp; Details.....</a><br><br></td></tr>");
		}
news_date exists in DB but it gives
Error:
Invalid column name
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 26 2006
Added on Oct 29 2006
2 comments
163 views