就是在该方法调用中,我们获得然后再关闭数据库连接。
It is in this method call that the database connection is obtained and subsequently closed.
最后,我们将检索sql语句的结果并关闭数据库连接。
Finally, we retrieve the results of our SQL statement and close the connection to the database.
当应用程序关闭时,会关闭数据库连接、保存当前状态,等等。
When the application shuts down, it can close database connections, save the current state, and so on.
注意:关闭数据库连接的最佳时间取决于Web应用程序的特定业务逻辑。
Note: the optimal time to close the database connection will depend on the specific business logic of your Web application.
事件处理程序中加入关闭数据库连接或执行其他清理操作的代码,那么这些代码可能就会被调用,而用户仍然在使用您的解决方案。
Event handler that closes database connections or performs other clean-up actions, that code might be called while the user is still working with your solution.
这个过程使用ApacheDerby项目中的Type4JDBC驱动程序连接数据库,从数据库中提取元数据,然后关闭数据库连接。
This process used a Type 4 JDBC driver from the Apache Derby project to connect to a database, extract metadata from the database, and then close the database connection.
关闭和停止数据库连接。
这个函数尝试关闭以前打开的数据库连接。
This function attempts to close the previously opened database connection.
打开和关闭连接的过程开销较大,会影响到应用程序或数据库的性能,而使用连接池就可以消除大部分这样的开销。
Opening and closing connections is an expensive process affecting application or database performance and the use of connection pooling helps eliminate most of that overhead.
也就是说,真正的数据库连接会相对较少关闭,但它们的池代理则会随着每个事务获取或释放。
That is, the real database connections are closed relatively infrequently, but their pooled proxies are acquired and released with every transaction.
如果在获取对象之后关闭Hibernate会话和相关联的数据库连接,在访问关联之前没有恢复,那么就会发生这种错误。
This error can occur if the Hibernate session and associated database connection is closed after the object was retrieved, but before the association was accessed.
但是,为了关闭Derby,这个连接url不能包含任何对数据库名称的引用。
To shut down Derby, however, this connection URL must be devoid of any reference to a database name.
现在不需要到同一数据库的两个连接,因此可以使用disconnect;命令关闭当前连接。
You don't need two connections to the same database right now, so you can use the disconnect; command to close the current connection.
在关闭该对话框之前,应单击test按钮,以检验是否输入了连接和使用IBMDB 2UDBSAMPLE数据库所需的正确信息。
Before you close this dialog, make sure you click on the Test button to verify that you've entered the correct information to connect to and use the IBM DB2 UDB SAMPLE database.
在关闭此对话框之前,务必单击test按钮,验证已为连接和使用IBMDB 2UDBSAMPLE数据库输入了正确的信息。
Before you close this dialog, make sure to click on the Test button to verify that you've entered the correct information to connect to and use the IBM DB2 UDB SAMPLE database.
当您核实连接到数据库的连接之后(图16),关闭这个部分(点击这个数据库窗口右上角的X)。
After you verify your connection to the database (Figure 16), close the session (click the X in the upper right of the database session window).
选择您的连接(您的数据库连接现在可能已关闭;必要时请选择Reconnect链接并再次输入您的凭据),然后选择CUSTSCH模式。
Select your Connection (your database connection may have closed by now; select the Reconnect link and enter your credentials again, if necessary), and select the CUSTSCH schema.
实现数据库连接池,重用连接对象,而不是重复地打开和关闭连接。
Implement connection pools to the database and reuse connection objects, rather than repeatedly opening and closing connections.
因为在于数据库交互时,打开以及关闭数据库的开销是非常昂贵的,您应该将您的数据库连接放在池中并且能重新使用。
Since opening and closing the connection is the most expensive part of interacting with a database, you will want to pool and reuse your database connection.
因为可以在运行数据库应用程序代码的JVM之外管理连接或数据库游标这样的资源,所以应用程序必须显式地关闭这些资源。
Because these resources, like the connection or any database cursors, can be managed outside the JVM running your database application code, your application must close them explicitly.
例如,您可能会想要验证本地数据库应用程序是否打开了连接、执行了查询,并随后关闭了此连接。
For example, you might want to verify that a native database application opened a connection, executed a query, and then closed the connection.
虽然这看上去合乎逻辑,但是存在一个重要影响:如果由于某种原因关闭了数据库连接,那么也将关闭该数据库包含的所有数据库对象。
Although it may seem logical, this has an important effect: If a database connection is closed for some reason, any database objects that it contains are also closed.
与连接操作对应的函数是数据库关闭函数。
A complementary function to the connect operation is the database close function.
如果没有它,XMLToSQL在执行一个操作前,将使用用户提供的数据库信息来创建JDBC连接,完成操作后,又会关闭连接。
Without this, XMLToSQL creates a JDBC connection using the user-provided database information before executing an action, and then closes the connection after execution.
它以MySQL数据库连接对象作为参数;如果数据库关闭操作成功,它就返回true,否则返回false。
It takes the MySQL database connection object as a parameter and returns true if the database close operation was successful and false if it failed.
所以打开后关闭它一个数据库连接。
经常发生的情况是:我们打开了一个连接,执行了所需要的数据库操作,但是我们没有显示的关闭连接。
At times what happens is, we open the connection, performs the desired database operation, but we do not close the connection explicitly.
数据库连接的建立和关闭是极其耗费系统资源的,在很多情况下是系统的瓶颈。
It costs much the system resources to make and close database connection, and in many cases is the bottleneck in the system.
请确保您关闭该连接或你得打你一顿头的后面的数据库管理员。
Make sure you close that connection or you'll have a database administrator smacking you in the back of the head.
请确保您关闭该连接或你得打你一顿头的后面的数据库管理员。
Make sure you close that connection or you'll have a database administrator smacking you in the back of the head.
应用推荐