| 发表于:2008-01-11 11:38:38 楼主 |
public function getallunit(con as adodb.connection) as vector dim strsql as string dim rs as new adodb.recordset dim result as new vector dim dunit as dictionary strsql = "select fname,fdefault,fconvert from t_unit order by fdefault,fname" rs.open strsql, con, adopendynamic, adlockoptimistic while not rs.eof set dunit = new dictionary dunit("name") = rs("fname") dunit("default") = rs("fdefault") dunit("convert") = rs("fconvert"): debug.print rs("fname") & ":" & rs("fconvert") result.add dunit rs.movenext wend 非常怪的是,我如果调试时,在debug语句行加了断点,结果就能出来;否则就是没有更新的结果?为什么? 数据库是access,用ado |
|
|
|
|