请问有关conncetion和recordset
常常看到别人使用connection和recordset来操作数据库的代码都有好几种方法,觉得有点乱,有谁能帮我解决一下吗?set rs=server.createobject("adobd.recordset")
set cn=server.createobject("adobd.connection")
conn.open "driver={microsoft access driver(*.mdb)}:dbq="&server.mappath("mydata.mdb")
sql=select * from gbook where....
rs=cn.excute(sql)
和
set rs=server.createobject("adobd.recordset")
set cn=server.createobject("adobd.connection")
conn.open "driver={microsoft access driver(*.mdb)}:dbq="&server.mappath("mydata.mdb")
sql=select * from gbook where....
rs.open sql cn 1,1
这相同效果吗?