A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
JDBC and Relational Databases
how to get dynamic data from the oracle back end
Joined: Aug 01, 2006
Mar 31, 2008 03:19:00
getting dynamic data from the oracle.
i want to make the below code as dynamic one. please help me.
rset = stmt.executeQuery("select * from VW_SAP_CFOUR_PODATA where dt_etd='14-NOV-08'");
insted of given the hard coded date i want to give the dynamic vaule.
thanks in advance,
author & internet detective
Joined: May 26, 2003
Mar 31, 2008 17:36:00
You want to use a PreparedStatement
PreparedStatement stmt = conn.prepareStatement("select * from VW_SAP_CFOUR_PODATA where dt_etd=?"); stmt.setDate(1, yourDate); rset = stmt.executeQuery();
This also has the advantage of not having to worry about the date format.
OCA 8 book
How To Ask Questions The Smart Way
SCEA Part 1
Part 2 & 3
Core Spring 3
TOGAF part 1
I agree. Here's the link:
subject: how to get dynamic data from the oracle back end
JDBC connection with JTable
Mail Merge in frame maker?
displaying the data from oracle in excel sheet
Dynamic Data Display in JSF
Java Dynamic Servlet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015