我的数据库程序有若干个窗体,使用ado方式,虽然只有两个表,但各个窗体中显示的条件不同,因此我在模块里定义了很多诸如public normal_rs as new ado.recordset,public name_rs as new ado.recordset...等语句,然后在各个窗体中又有很多normal_rs.open,noraml_rs.close语句,请问这样合适吗,高手应该怎样处理这些问题呢?
---------------------------------------------------------------
这样是可以的!
当然,所有的语句写的都是为了得到结果!
得到正确的结果的方法就是正确的!
还有,能尽量重用一个RECORDSET的话,就尽量重用吧!
ADO中不是有一个“重构形”的方法吗?
---------------------------------------------------------------
当然没问题,不过在你再次打开前,必须先recordset.close,否则会出错
---------------------------------------------------------------
1. It will be better if u choose set Rst_name= connectionName.executive
2. if ur Recordset point to a same table, u can get all date in ONE time, and use the "filter" to use the defferent data