如何利用数据库内容建立一个下拉式列表?_编程10000问教程-查字典教程网
如何利用数据库内容建立一个下拉式列表?
如何利用数据库内容建立一个下拉式列表?
发布时间:2016-12-29 来源:查字典编辑
摘要:如何利用数据库内容建立一个下拉式列表?

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

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

' 清空对象

%>

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新编程10000问学习
    热门编程10000问学习
    编程开发子分类