查询语言:
Set rs = cn.Execute("select 站名 from tabAddress where 区站号 not in (select 区站号 from tabTimeData where 入库时间>'2011-09-27')")
如查询结果为:站名1,站名2,站名3,请问怎么把查询结果赋值给变量,或把查询结果写入.TXT文件,再用VB读.TXT,谢谢了!
Set rs = cn.Execute("select 站名 from tabAddress where 区站号 not in (select 区站号 from tabTimeData where 入库时间>'2011-09-27')")
如查询结果为:站名1,站名2,站名3,请问怎么把查询结果赋值给变量,或把查询结果写入.TXT文件,再用VB读.TXT,谢谢了!
这个应该有问题吧?
Set rs = cn.Execute("select 站名 from tabAddress where 区站号 not in (select 区站号 from tabTimeData where 入库时间>#2011-09-27#)")2:
dim s as string
with rs
if .recordcount>0 then
.movefirst
while not .eof
s=.fields("站名")
select case s
case "站名1"
text1=
case "站名2"
text2=....
case "站名3"
text3=.............
end select
.movenext
wend
end if
end with