tailieunhanh - Java Server Pages: A Code-Intensive Premium Reference- P5

Java Server Pages: A Code-Intensive Premium Reference- P5:Before you begin reading Pure JSP Java Server Pages, you might want to take a look at its basic structure. This should help you outline your reading plan if you choose not to read the text from cover to cover. This introduction gives you an overview of what each chapter covers. | Figure The Type 3 JDBC-Net driver. Type 4 Native-Protocol Pure Java Driver The Type 4 drivers are pure Java drivers that communicate directly with the vendor s database. They do this by converting JDBC commands directly into the database engine s native protocol. The Type 4 driver has a very distinct advantage over all the other driver types. It has no additional translation or middleware layers which improves performance tremendously. Figure diagrams the communications of a Type 4 driver. Figure The Type 4 native-protocol JDBC driver. JDBC Basics Now that we have discussed what the JDBC is and some of its characteristics let s start learning how to use it. In this section we are going to discuss how to install and set up a Type 1 driver make a connection to the database and perform the basic SQL commands. 1. 2. Installing and Setting Up a Type 1 Driver In the JDBC examples throughout this book we will be connecting to a Microsoft Access database using a Type 1 driver. To install the JDBC-ODBC Bridge simply download the JDK and follow the installation directions. The JDBC-ODBC Bridge is included in version and later. The JDBC-ODBC Bridge requires no specific setup steps but the ODBC driver does. For our examples assume that you are using a PC and running Windows 9x or NT. If not you will need to create your own database using the drivers supplied by your database vendor. To configure the ODBC data source for the examples you will follow these steps Copy to your local drive the database file which can be found on this book s Web site. Start the application ODBC Administrator found in the Windows Control Panel. You will see a window similar to the one in Figure . - 41 - Figure The ODBC Administrator. 3. Select the Add button to add a new data source. Figure shows the Create New Data Source screen. Figure The Create New Data Source screen. 4. Select the Microsoft Access Driver and click the Finish button. You will now be

TỪ KHÓA LIÊN QUAN