Alright, one more. Resolving this issue should have me compiling and tracking down my logic errors; it'll be nice to be beyond the small issues that I'm having lately preventing me from getting this project compiled to a workable .war file.
As you can see in the following snippet, I am creating the following java.sql PreparedStatement object in order to execute a query and thus retrieve my data. In this PreparedStatement, I need to set 4 parameters: 2 integers and 2 different java.util.Date objects which will be used to retrieve the applicable records. Here is the applicable code with how I'm attempting to do this:
(my bean class encloses, of course)
Code:
private ResultSet pollPunches() {
...
startDate = new Date(Year, Month, 1, 0, 0, 0);
endDate = new Date(Year, Month, 31, 23, 59, 59);
//of course the above endDate is actually calculated with a switch/
//case construct to test for a 31/30 day month or a 28/29 day February
//in case of leap year
...
try {
//general database connection setup
...
//setting of String sql = "MY SQL SELECT WHERE ouah = ? . . .";
...
PreparedStatement stmt = myConnection.prepareStatement(sql);
stmt.setInt(1, x); //no error
stmt.setInt(2, y); //no error again
stmt.setDate(3, startDate); //problem as described below
stmt.setDate(4, endDate); //ditto
ResultSet rs = stmt.executeQuery();
return rs;
}
Here's the problem from the 2 stmt.setDate() lines:
---
cannot find symbol
symbol : method setDate(int, java.util.Date)
location : interface java.sql.PreparedStatement
---
And that's all that NetBeans is telling me.
The 'ant' output doesn't seem to tell anything more than what NetBeans is spewing at me, either.
TIA
-=-=-=-
Damon Getsman
http://www.ITRx-ND.com/
-=-=-=-