Importing the JDBC Packages


In order for your programs to use JDBC, you must import the required JDBC packages into your Java programs. There are two sets of JDBC packages: the standard JDBC packages from Sun Microsystems and Oracle s extension packages. The standard JDBC packages enable your Java programs to access the basic features of most databases, including the Oracle database, SQL Server, DB2, and MySQL. The Oracle extensions to JDBC enable your programs to access all of the Oracle-specific features, as well as the Oracle-specific performance extensions. You ll learn about some of the Oracle-specific features later in this chapter.

To use JDBC in your programs you should import the java.sql.* packages, as shown in the following import statement:

 import java.sql.*; 

Of course, importing java.sql.* imports all of the standard JDBC packages. As you become proficient in JDBC, you ll find that you don t always need to import all the classes: you can just import those packages that your program actually uses.




Oracle Database 10g SQL
Oracle Database 10g SQL (Osborne ORACLE Press Series)
ISBN: 0072229810
EAN: 2147483647
Year: 2004
Pages: 217

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net