日期:2014-05-17  浏览次数:20844 次

读取数据id=conn.execute("select id from table where id2=1")(0)
如,
在ASP   里
<%id=conn.execute( "select   id   from   table   where   id2=1 ")(0)
读一个数据这样写。那要读出两个字段要怎么写?


id=conn.execute( "select   id   from   table   where   id2=1 ")(0)
这个   ...???=conn.execute( "select   id,name   from   table   where   id2=1 ")   ???


理解我的意思吗??
%>

------解决方案--------------------
sql= "select id ,name from table where id2=1 "
rs.open sql,conn,1,3
id=rs(0),name=rs(1)
具体自己测试看

------解决方案--------------------
id=conn.execute( "select id,name from table where id2=1 ")

a=id(0,0)
b=id(0,1)

未测试,不知道是不是```