set rs=new adodb.recordset rs.open "select c from a where b='" & 你的变量 &"'",cnn msgbox (rs.fields(0)) rs.close set rs=nothing
dim s as string s=a.fields("b").value MsgBox(prompt[, buttons] [, title] [, helpfile, context]) 将prompt替换成s
DIM rs as ADODB.Recordset ...set rs = cnn.execute ("select C from A where B='Test'") if not rs.eof then msgbox rs("C") end if rs.close set rs=nothing如果是很多用户共用远程数据库的话,尽量多CLOSE,OPEN
rs.open "select c from a where b='" & 你的变量 &"'",cnn
msgbox (rs.fields(0))
rs.close
set rs=nothing
dim s as string
s=a.fields("b").value
MsgBox(prompt[, buttons] [, title] [, helpfile, context])
将prompt替换成s
...set rs = cnn.execute ("select C from A where B='Test'")
if not rs.eof then
msgbox rs("C")
end if
rs.close
set rs=nothing如果是很多用户共用远程数据库的话,尽量多CLOSE,OPEN
我用movenext都没用?
do while not rs.eof
msgbox rs("C")
rs.movenext
loop
end if