一般情况下我们使用DLOOKUP,或才ADO,DAO来读取记录,这样我们来个比较特殊的用法得到录:
dim strname as string '方法一: strname = currentproject.connection.execute("select name from emplyees where id =3").getstring '方法二: strname = currentproject.Connection.Execute("("select name from emplyees where id =3")("name") '---------------------- 这个方法中隐式创建了一个ADO的记录集,并使用了记录集的GETSTRING或字段索引的方法得到结果注意:条件字段必须是主键(不重复) |
|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )
GMT+8, 2024-5-3 14:09 , Processed in 0.072972 second(s), 16 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.