![]() Once you have registered the driver, you can open a connection to the database with the static getConnection() method of the class. DriverManager.registerDriver (new ()) Open a Connection to a database You register the driver only once in your Java application. It is not valid for Microsoft Java virtual machines. However, this method is valid only for JDK-compliant Java virtual machines. Note: Alternatively, you can use the forName() method of the class to load the JDBC drivers directly. The registerDriver() method takes as input a "driver" class, that is, a class that implements the interface, as is the case with OracleDriver. This class provides a basic service for managing a set of JDBC drivers. ![]() You do this with the static registerDriver() method of the class. To access a database from a Java application, you must first provide the code to register your installed driver with your program. The Oracle JDBC driver class that implements the interface. SUMMARY: NESTED | FIELD | CONSTR | METHOD OracleDriver (Oracle Database JDBC Java API Reference)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |