Following are the basic steps to create a JDBC application:
- Import packages containing the JDBC classes needed for database programming.
- Register the JDBC driver, so that you can open a communications channel with the database.
- Open a connection using the DriverManager.getConnection () method.
- Execute a query using an object of type Statement.
- Extract data from result set using the appropriate ResultSet.getXXX () method.
- Clean up the environment by closing all database resources relying on the JVM's garbage collection.
No comments:
Post a Comment