不好意思,问一个初级问题。

redleaf 2002-02-27 03:48:51
在获取数据库中的记录之前,有很多种方法连接数据库,如先建立connection通道,再用recordset,或者直接用recordset等等,多种方法,但是这些方法有什么区别?优点,缺点呢?
...全文
40 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
redleaf 2002-02-28
  • 打赏
  • 举报
回复
尽管我还是很糊涂,但还是很谢谢你.
karma 2002-02-27
  • 打赏
  • 举报
回复
the concept is same, always use one Connection object.

If you have single Recordset or single Command, then use connection string, because, internally, ADO will construct a Connection Object for you
redleaf 2002-02-27
  • 打赏
  • 举报
回复
能再说详细点吗?还有command呢?
karma 2002-02-27
  • 打赏
  • 举报
回复
if you are going to use Connection object in multiple places, for example, if you have

set rs = conn.execute(sql)
...
set rs2 = conn.execute(sql)
...
rs3.Open sql, conn

then you should 建立connection通道first

but if you are just going to use Recordset once, then you should just do
Recordset.Open sql, connection_string,...
pukerno3 2002-02-27
  • 打赏
  • 举报
回复
区别就是在速度和效率上有所差异。

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧