Installing the JDBC Driver in Java
Installing the JDBC Driver Draw QR Code In Java Using Barcode printer for Java Control to generate, create QR-Code image in Java applications. Although Dreamweaver includes everything you need to use the Java JDBC driver classes for several databases, it doesn t include the code for the JDBC drivers To install the appropriate JDBC driver for your database, follow these steps: Encoding Bar Code In Java Using Barcode drawer for Java Control to generate, create barcode image in Java applications. Book VII 5
Decoding Barcode In Java Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications. Configuring JSP Database Connections
Denso QR Bar Code Generator In Visual C# Using Barcode encoder for VS .NET Control to generate, create QR Code JIS X 0510 image in .NET framework applications. 1 Download the Java jar file for your database
QR Code JIS X 0510 Encoder In Visual Studio .NET Using Barcode printer for Visual Studio .NET Control to generate, create QR Code 2d barcode image in .NET framework applications. Java packages are distributed as jar files See Table 5-2 to find out where to download the file you need QR Drawer In Visual Basic .NET Using Barcode maker for .NET framework Control to generate, create Quick Response Code image in Visual Studio .NET applications. 2 Copy the Java jar file to C:/program files/macromedia/ USS Code 39 Generation In Java Using Barcode generator for Java Control to generate, create Code 3 of 9 image in Java applications. Dreamweaver/configuration/JDBCDrivers
Create Data Matrix ECC200 In Java Using Barcode encoder for Java Control to generate, create ECC200 image in Java applications. The name of the jar file may not exactly match the class that s supplied in the file For example, the name of the MySQL jar file is mysqlconnector-java-3112-binjar Barcode Creation In Java Using Barcode generator for Java Control to generate, create barcode image in Java applications. 3 Restart Dreamweaver
Bar Code Generator In Java Using Barcode creator for Java Control to generate, create barcode image in Java applications. After you install the database driver, you can create a dynamic page and the database connection in JSP, as described in the next section Generate Bar Code In Java Using Barcode generator for Java Control to generate, create barcode image in Java applications. Adding a JSP Database Connection
Identcode Generator In Java Using Barcode generation for Java Control to generate, create Identcode image in Java applications. Table 5-2 Barcode Generator In Visual Studio .NET Using Barcode generation for Visual Studio .NET Control to generate, create barcode image in Visual Studio .NET applications. Database
Reading Code 39 In .NET Framework Using Barcode decoder for .NET Control to read, scan read, scan image in .NET applications. IBM DB2 App/Net Driver MySQL Driver Connector/J Oracle Thin Driver
Paint Code 128 Code Set C In .NET Using Barcode generation for .NET Control to generate, create Code 128B image in VS .NET applications. JDBC Database Driver Download Locations
Making ANSI/AIM Code 39 In Visual C#.NET Using Barcode encoder for VS .NET Control to generate, create ANSI/AIM Code 39 image in .NET framework applications. Driver
Generate UPC-A In .NET Using Barcode drawer for VS .NET Control to generate, create UPCA image in .NET applications. COMibmdb2jdbcapp DB2Driver orggjtmmmysqlDriver
Draw Data Matrix ECC200 In .NET Framework Using Barcode maker for Visual Studio .NET Control to generate, create ECC200 image in VS .NET applications. Web Site
Scan Barcode In Java Using Barcode recognizer for Java Control to read, scan read, scan image in Java applications. www-306ibmcom/ software/data/db2/ udb/ad/v8/java/ wwwmysqlcom/ products/ connector/j/ wwworaclecom/ technology/software/ tech/java/sqlj_jdbc/ htdocs/jdbc_10201 html wwwinetsoftwarede/ Downloadhtm Included with Dreamweaver Bar Code Maker In C# Using Barcode encoder for Visual Studio .NET Control to generate, create barcode image in Visual Studio .NET applications. oraclejdbcdriverOracleDriver
Inet Driver (i-net Gate) Sun JDBC-ODBC Driver
cominettdsTdsDriver sunjdbcodbcJdbcOdbcDriver
Creating a new dynamic JSP page
Because pages that work with a database are dynamic, Dreamweaver requires you to create a dynamic page before you can add a database connection Follow these steps to create a new dynamic JSP page: 1 Choose File New
The New Document window appears
2 On the General tab, select Dynamic Page from the Category list 3 Select JSP from the Dynamic Page list, as shown in Figure 5-1 Dreamweaver now includes JSP code whenever code segments are needed
4 Select a document type definition from the Document Type (DTD) drop-down list Accept the default XHTML 10 Transitional setting to create an XHTMLcompliant page
5 Click Create
Your new dynamic JSP page is ready to use
Adding a JSP Database Connection
Figure 5-1: The New Document window for an XHTML JSP page
Dreamweaver allows you to add a database connection now that the dynamic JSP page exists
Connecting to a database
After you create a dynamic JSP page (as described in the previous section), follow these steps to create a database connection in JSP: Book VII 5
Configuring JSP Database Connections
1 Open the Databases panel
Expand the Application panel, if it s not already expanded, and then click the small triangle in the panel s title bar until it points downward 2 Click the plus (+) button and select a database connection type from
the drop-down list You can choose from the database types listed in Table 5-1 After you make a selection, a connection dialog box named for the type of connection appears The Driver and URL fields are prefilled for all the standard database driver types (see Figure 5-2, which shows the MySQL driver) The fields in the custom connection dialog box, shown in Figure 5-3, are all blank 3 Enter a database connection name in the Connection Name field
Dreamweaver uses this name to reference your database connection The name can have letters, numbers, or an underscore: No other characters are allowed Adding a JSP Database Connection
Figure 5-2: The MySQL Driver (MySQL) database connection dialog box
Figure 5-3: Enter the custom JDBC connection for your database
4 Enter the JDBC database driver in the Driver field
The field is prepopulated for every database type except the Custom JDBC Database If you re setting up a custom connection, you can usually find the Java class name in the driver s documentation The class name tells Dreamweaver what Java code to call to access the database For example, using the MySQL driver, the class name is orggjtmmmysqlDriver If you re using a JDBC driver, you should have already downloaded it If you click the Test button and you get a Class not found alert, you need to download the class See Table 5-2 for a list of download locations 5 In the URL field, replace the bracketed values with the information
for your database If you re creating a custom connection, refer to the documentation that came with your JDBC driver for the format of this connection string The URL field contains all the information required to log in to the database in one long string For example, for the MySQL driver, it lists the following URL: jdbc:mysql://[hostname]/[database name] In this example, replace the bracketed values [hostname] and [database name] with the information for your database Editing a JSP Database Connection
6 Enter the database username in the User Name field
The server s administrator should provide this information
7 Enter the database password in the Password field
The password goes with the username from the previous step
8 Choose the Using Driver On This Machine radio button
This setting determines if the local machine or the remote application server s driver is used to connect to the database If you re using a Macintosh, you can ignore this setting: Macs always use the remote application server to connect 9 Click the Test button to confirm that your connection is set up correctly
A dialog box confirms a successful connection or displays an error message if it couldn t connect If you received a Class was not found error message when you clicked the Test button, you don t have the driver installed for that type of database Download the Java package that corresponds to the type of database driver Table 5-2 lists where to find each driver on the Internet
|
|
|
|
| ALL RIGHTS RESERVED. Business Refinery (c) 2006 - 2010. | Terms of Use | Privacy Policy |