如何利用数据库内容建立一个下拉式列表?
如何利用数据库内容建立一个下拉式列表?<% myDSN="DSN=xur;uid=xur;pwd=xur"mySQL="select * from authors where AU_ID<100"set conntemp=server.createobject("adodb.connection")conntemp.open myDSNset rstemp=conntemp.execute(mySQL)if rstemp.eof thenresponse.write "噢,数据库...
如何利用数据库内容建立一个下拉式列表?
<% myDSN="DSN=xur;uid=xur;pwd=xur"
mySQL="select * from authors where AU_ID<100"
set conntemp=server.createobject("adodb.connection")
conntemp.open myDSN
set rstemp=conntemp.execute(mySQL)
if rstemp.eof then
response.write "噢,数据库为空!"
response.write mySQL
conntemp.close
set conntemp=nothing
response.end
end if%>
<%do until rstemp.eof %>
<%
rstemp.movenext
loop
rstemp.close
set rstemp=nothing
conntemp.close
set conntemp=nothing
' 清空对象
%>
很赞哦!()
- 上一篇
asp中在JScript中使用RecordSet对象的GetRows
asp中在JScript中使用RecordSet对象的GetRows
- 下一篇
浅析Java、C/C++、JavaScript、PHP、Python分别用来开发什么?
如何利用数据库内容建立一个下拉式列表?<% myDSN="DSN=xur;uid=xur;pwd=xur"mySQL="select * from authors where AU_ID<100"set conntemp=server.createobject("adodb.connection")conntemp.open myDSNset rstemp=conntemp.execute(mySQL)if rstemp.eof thenresponse.write "噢,数据库...
大图广告(830*140)