当前位置: 代码迷 >> ASP >> 读取数据id=conn.execute("select id from table where id2=1")(0)解决方法
  详细解决方案

读取数据id=conn.execute("select id from table where id2=1")(0)解决方法

热度:1049   发布时间:2012-02-11 09:51:34.0
读取数据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)

未测试,不知道是不是```
  相关解决方案