It is not too early, although I am not sleepy, but there is tomorrow's life, must continue.
Just finish this and go to sleep. Dragged on for days.
March 9, 2015 01:27:28
Problem 1:jdbc->dao, at first want to write a generic can query a set of functions, SELECT count(*) FROM users
This method is implemented, and I want to implement a like this with a group SELECT count(*) FROM users GROUP BY address
by this general method, I created a new entity class number, found that the compilation pass, Consult others, finally solve.
Workaround: The number class names in ① and Java conflict. ② I went astray, like this sentence, is very specific, the change is much more natural, I do not need to implement a common method
The problem 2:jdbc connected when Class.forName (Driverclass), Drivermanager.getconnection (), although I know that in the re-driver has already registered the driver, But how do you convert a class instance to a new Driver ()?
java.sql.DriverManager.registerDriver(new Driver());
Solution: Class.forName (Driverclass), obtained is actually loaded the driver class instance, it realizes the transformation itself.
Question 3:sql statement, in the execution of such a query, why will the error?
SELECT rownum, *FROM employees;
Why do I have to add a table name to the front?
Resolved: Not Resolved
A summary of the programming problems of a trickle-flow---