Hi to all!
I have the following situation...
I use CallableStatement from java.sql package. When I use setDate function prior to executing stored procedure, I get an error:
Cannot find symbol symbol: method setDate(int, java.util.Date) location: interface java.sql.CallableStatement"
Here's the sample code:
Connection con = null;
CallableStatement proc_stmt = null;
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
con = DriverManager.getConnection("jdbc:sqlserver://servername;databaseName=DBName", "UNAME", "PASS");
proc_stmt = con.prepareCall("{ call InsertSomething(?, ?) }");
proc_stmt.setString(1, "A00999999");
proc_stmt.setDate(2, new Date());
proc_stmt.executeQuery();
proc_stmt.close();
con.close();
I even tried this using Calendar class with appropriate functions, but the effect was the same.