步骤1a:建立数据库连接。
打开DB 2命令窗口并建立数据库连接。
Open a DB2 command window and establish the database connection.
JDBC 2.0提供了两种建立数据库连接的方法。
JDBC 2.0 provides 2 methods of establishing database connections.
如果无法建立数据库连接,那么这个函数返回false。
If the database connection attempt failed, then this function returns false.
系统授权id:这是表示建立数据库连接的用户的授权id。
System authorization ID: This is the authorization ID representing the user who establishes a database connection.
IP地址(或域名):表示建立数据库连接时所在的IP地址。
IP address (or domain name) : This represents the IP address from which the database connection is established.
在建立数据库连接之后,为insert语句创建一个简单的字符串。
After establishing a database connection, create a simple string for your INSERT statement.
如果建立数据库连接以及记录集,并在HTML中显示数据。
How to first create a database connection, then a recordset, and then display the data in HTML.
本文主要关注建立数据库连接以及处理潜在的数据库错误和警告。
This article focuses on establishing the database connection and dealing with potential database errors and warnings.
由于篇幅的限制,本文无法全面讨论用JDBC建立数据库连接的不同方式。
Given space limitations, this article can't fully explore the different ways of establishing a database connection with JDBC.
它直接建立数据库连接来执行数据库操作,如数据更新和结果集检索。
It establishes database connections directly to perform database operations such as data updates and result set retrieval.
在查询ApacheDerby中的数据库之前,必须建立数据库连接。
Before you can query a database in Apache Derby, you must establish a database connection.
这意味着应用程序使用JDBCDriverManager类来建立数据库连接。
This means that the application USES the JDBC DriverManager class to establish the database connection.
在执行时,当建立数据库连接时,确定用户应用程序代码页,而且它只在连接期间有效。
At execution time, the user application code page is established when a database connection is made, and it is in effect for the duration of the connection.
在调用db 2 move命令之前,并不需要数据库连接;该工具会为您建立数据库连接。
A database connection is not required prior to invoking the db2move command; the utility does that for you.
这个错误消息是由于建立数据库连接的方式造成的:db 2 “CONNECTTO MYSAMPLE ”。
The cause of the error message is the way the connection to the database was established: db2 "connect to MYSAMPLE".
构造函数将按照前面的描述创建一个DBManager对象以建立数据库连接,然后获得productdao类的实例。
The constructor creates a DBManager object to establish a database connection, as discussed earlier, and then acquires an instance of the ProductDAO class.
到目前为止,本文已经讨论了使用JDBCAPI和ApacheDerby建立数据库连接所需的许多组件。
Up to this point, this article has discussed a number of components that are required to establish a database connection by using the JDBC API with Apache Derby.
使用扩展JDBC API (J2EE中有此扩展JDBCAPI)的应用程序可以使用已命名的数据源来建立数据库连接。
Applications that use the extended JDBC API that is available in J2EE may use named datasources to establish database connections.
要使用doQuery方法,需要建立数据库连接并且从try ...catch块内调用方法,如清单4 所示。
To use the doQuery method, you need to establish a database connection and call the method from within a try ... catch block, as shown in Listing 4.
在调用CLPPlus期间,可以指定一个连接字符串,以便在CLPPlus会话中建立数据库连接,如以下示例所示。
A connection string can be specified during CLPPlus invocation in order to establish the database connection in CLPPlus session as shown in the example below.
重要的是,要在连接数据库之前设置DB 2CODEPAGE,因为数据转移实用程序会在建立数据库连接时判断编码页。
It is important to set DB2CODEPAGE before connecting to the database because the data movement utilities determine the code page when the connection to the database is established.
结果表明:这个模型在处理数据转换时具有相对独立性,可将SQL命令作为XM L文档的标签,并将建立数据库连接和生成SQL命令整合在中间件中。
This model has relatively independency in dealing with data transition, using SQL command as label in XML document and integrating database connection and SQL command building in the middleware.
要建立数据库连接,可以选择DBname,userID,password,DB2UniversalDatabase 8.1,然后接受剩余选项的所有缺省值。
To establish a database connection, select DB name, userID, password, DB2 Universal Database 8.1, and take all defaults for the remaining options.
例如,通过JDBCConnection建立数据库连接;并且为了向数据库发送SQL查询,从相应的Connection对象创建一个JDBC Statement对象。
For example, you make a database connection via a JDBC connection; and to send an SQL query to a database, you create a JDBC Statement object from the appropriate connection object.
清单4显示了一个用于建立DB 2数据库连接的方法的摘录。
Listing 4 shows an excerpt from a method that establishes a DB2 database connection.
在缺省情况下,DB 2自动客户端重新路由功能每10分钟重新尝试建立到数据库的连接。
By default, the DB2 Automatic Client Reroute feature retries to establish a connection to the database repeatedly for up to 10 minutes.
在应用程序中,这个名称用于替代任何特定于数据库的信息,以建立到数据库的连接。
This name is used in applications in place of any database-specific information in order to establish a connection to the database.
建立到数据库服务器的连接。
首先需要建立到目标数据库的连接。
First you need to establish a connection to your target database.
应用推荐