You can convert a java.util.Date to java.sql.Timestamp value by using the getTime() method of Date class. This method return the long mil...
Tampilkan postingan dengan label JDBC. Tampilkan semua postingan
Tampilkan postingan dengan label JDBC. Tampilkan semua postingan
How to check if ResultSet is empty in JDBC - Java Example
The JDBC ResultSet doesn't provide any isEmpty() , length() or size() method to check if its empty or not. Hence, when a Java programm...
How to solve java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test
The error "java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost:3306/test" occurs when you try to connect M...
Why Timestamp cannot be used in place of Date in Java?
One of the tricky question from Java Interview is, "Can we pass a Timestamp instance to a method expecting java.util.Date? " , it...
How to convert java.sql.Date to java.util.Date in Java - JDBC Example
You often need to convert java.sql.Date to java.util.Date while interacting with databases from Java application. Since JDBC the Java API ...
How to setup JNDI Database Connection pool in Tomcat - Spring Tutorial Example
Setting JNDI Database Connection pool in Spring and Tomcat is pretty easy. Tomcat server documentation gives enough information on how to se...
JDBC Batch INSERT and UPDATE example in Java with PreparedStatement
JDBC API in Java allows program to batch insert and update data into database, which tends to provide better performance by simple virtue of...
Top 10 JDBC Interview questions answers for Java programmer
JDBC Interview Question and Answer JDBC Questions are integral part of any Java interview, I have not seen any Java Interview which is com...
What is difference between java.sql.Time, java.sql.Timestamp and java.sql.Date - JDBC interview Question
Difference between java.sql.Time , java.sql.Timestamp and java.sql.Date is most common JDBC question appearing on many core Java intervie...
Top 10 JDBC Best Practices for Java Programmer
Java JDBC Best practices JDBC Best Practices are some coding practices which Java programmer should follow while writing JDBC code. As discu...