引用ADO:dim cn as new adodb.connection,rs as new adodb.recordset dim v1,v2,v3,v4,v5 cn.Open "你的连接字符串" rs.cursorlocation=aduseclient rs.Open "select 列1,列2,列3,列4,列5 from 表 where 条件",cn,3,2 if not rs.eof then v1=rs(0) v2=rs(1) v3=rs(2) v4=rs(3) v5=rs(4) end if
dim v1,v2,v3,v4,v5
cn.Open "你的连接字符串"
rs.cursorlocation=aduseclient
rs.Open "select 列1,列2,列3,列4,列5 from 表 where 条件",cn,3,2
if not rs.eof then
v1=rs(0)
v2=rs(1)
v3=rs(2)
v4=rs(3)
v5=rs(4)
end if