欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

如何利用数据库内容建立一个下拉式列表?

程序员文章站 2022-05-03 15:59:40
如何利用数据库内容建立一个下拉式列表?<% mydsn="dsn=xur;uid=xur;pwd=xur"...

如何利用数据库内容建立一个下拉式列表?

<% 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

' 清空对象
%>