首先,您设置一个到本地数据库的数据库连接对象。
First, you set up a database connection object to a local database.
创建与前面创建的元数据和数据库连接对象相关联的Mediator实例。
Create a Mediator instance associated with the metadata and database connection objects previously created.
在这里,我们可以模拟数据库连接对象的查询方法,这样我们就只需要返回结果,而不需要真正地去查询数据库。
In this case, we would mock the query method of the database connection object so that we could just return back the results instead of calling out to the database for them.
现在您可以直接传入一个对象,它与预期数据库连接对象相兼容,然后直接使用这个对象,而非创建一个新对象。
Now you can pass in an object directly that is compatible with the expected database connection object, and it will use that object instead of creating a new one.
它以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.
但只有在你连接到上下文对象的时候,你才可以修改对象并把它们保存回数据库。
You can change objects and save them back to the database, but only if you are connected to a context object.
就像数据库连接那样应该非常快,一旦该上下文对象超出范围,数据对象实质上就进入只读状态。
Once the context object goes out of scope, which like a database connection should be very quickly, the data objects essentially become read-only.
该数据连接允许您浏览数据库对象及其属性。
The data connection lets you browse the database objects and its properties.
您可以使用此适配器与使用JDBC连接的任何数据库交换业务对象。
You use this adapter to exchange business objects with any database that you can connect to using JDBC.
它们是应用程序中用于全局对象的一种常见模式,如数据库连接和配置设置。
They are a common pattern used for global objects in an application, such as database connections and configuration Settings.
数据源是指对象或工厂,用于生成与应用程序内的实际数据源(通常是数据库)的连接。
A data source refers to the object or factory that generates connections to the actual source of data (usually a database) within an application.
他介绍了如何使用JDBC驱动、连接、语句、结果集对象的类包装来工具化jdbc,并由此工具化数据库调用。
He describes how to use class wrapping of the JDBC driver, connection, statement, and result set objects to instrument JDBC, and hence, database calls.
这些映射只是将数据库中的正确位置与您请求的对象的字段连接起来。
These maps simply join the correct place in the database to the field of the object that you require.
展开此连接节点以根据指定的文件夹过滤器显示数据库对象的各个节点(表、视图、函数、过程)。
Expand the connection node to display the various nodes for the database objects (tables, views, functions, procedures) depending on the folder filters that were specified.
可信任上下文是一个数据库对象,定义了连接的属性。
A trusted context is a database object defining the set of properties for a connection.
与数据库资源一样,通过使用可以合用的连接对象来访问消息队列。
As in the case of a database resource, message queues are accessed using connection objects that can be pooled.
最后,验证联合数据库服务器可信上下文对象中的信任属性与连接请求中出现的信任属性相匹配。
Finally, verify that the trust attributes in the trusted context object on the federated database server actually match the trust attributes that are being presented in your connection request.
以下代码示例显示了EJB应用如何利用合用的连接对象来访问数据库资源(基于JDBC 2.0)。
The following code example shows how an EJB application might access a database resource by using pooled connection objects (based on JDBC 2.0).
在连接时,DB 2检查连接是否与数据库中可信上下文对象相匹配。
At connect time, the DB2 server checks to see if the connection matches the definition of a trusted context object in the database.
注意我是如何为CachedRowsetImpl对象指定数据库连接信息的。
Note how I specified my database connection information for the CachedRowsetImpl object.
另一种处理数据库连接的方法就是使用数据源(datasource)对象。
An alternative way of handling database connections is to use data source objects.
构造函数将按照前面的描述创建一个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.
由于连接池有许多优点,所以在Web应用程序中偏爱使用数据源对象的方法来处理数据库连接。
Because of the advantages of connection pooling, using data source objects is the preferred method of handling database connections in Web applications.
而link则可被设为对现有数据库连接或对象的一个引用。
You can set link as a reference to an existing database connection link or object.
稍后当谈到如何连接窗体上的组件和数据库中的对象时,我将介绍如何引用句柄rhroot。
I'll cover the use of the reference handle rhRoot later when I talk about how to connect components on the form to objects in the database.
可配置特性提供了一种机制,在这种机制下,不用重新编译流应用程序即可配置系统对象名称(例如,数据库连接或MQSeries队列的名称)。
Configurable properties provide a mechanism for system object names (such as database connections, or the name of an MQSeries queue) to be configured without recompiling a flow application.
与MicrosoftServerExplorer的集成,用以执行数据库活动(例如管理连接和浏览数据库对象)。
Integration into Microsoft Server Explorer to perform database activity (such as manage connections and explore database objects).
一旦应用程序连接到联合数据库,就能访问联合数据库中的所有已授权对象。
Once an application is connected to the federated database, it can access all authorized objects in the federated system.
在会话中存储数据对象:由于我们已从数据库断开连接,因此需要将联系人数据对象存储在会话中,以便将它用于下一页。
Store the data object in the session: Because we are disconnected from the database, we need to store the contact data object in the session to make it available to the next page.
如果成功地连接到数据库,这个函数会返回一个连接对象,后续的数据库读写操作需要使用这个对象。
Upon successfully connecting to the database, this function returns a connection object, which is required in the subsequent database read and write operations.
应用推荐