使用NetWeaver创建数据库连接

用途

You use this procedure to create a connection to the database you use for your persistent entities.

步骤

创建新的数据库连接

Choose ...

       1.      Choose Window ® Show View ® Other.

       2.      Choose Data ® Database Explorer in the Show View dialog.

       3.      Choose OK.

       4.      Select Connections in the Database Explorer.

       5.      Choose New Connection from the context menu. The New Connection dialog opens.

       6.      Select a database vendor, for example, if you are using the system database server, select MAXDB ® 7.6.

       7.      Complete the Connection URL details fields:

                            a.      Enter your database name, for example, if you are using the system database, JP1.

                            b.      Enter the JDBC driver class, for example, the system driver class  com.sap.dbtech.jdbc.DriverSapDB.

                            c.      Enter the location of the JDBC driver class on the file system, for example, if you wish to use the system driver, <SAP DB installation location>/programs/runtime/jar/sapdbc.jar.

                          d.      Enter the connection URL, for example, jdbc:sapdb://<DB Host Name>/JP1?timeout=0.

       8.      To use the predefined system datasource, enter SAPDEMO as the user name for the database.

       9.      To use the predefined system datasource, enter SAPDEMO as the password for the database.

If the persistence.xml in your application is empty, the persistence container assumes you are you using the default datasource. Thus, you must supply the SAPDEMO user name and password to use the predefined database schema and access the predefined tables.

   10.      Choose Finish. The database connection appears in the Connections tree in the Database Explorer. 

The New Connection Dialog

连接到已存在的数据库连接

       1.      To connect to an existing database connection, select the connection in the Database Explorer.

       2.      Choose Connect from the context menu.

posted @ 2006-12-27 21:55  爱生活,爱编程  阅读(197)  评论(0编辑  收藏  举报