... connection sqlcon; //数据库连接对象 resultset sqlrst; //结果集对象 string strcon; //数据库连接字符串 ...
基于6个网页-相关网页
首先,您设置一个到本地数据库的数据库连接对象。
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.
应用推荐