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

来源:asp之家 时间:2010-01-01 15:46:00 

代码如下:

<% 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
0
投稿

猜你喜欢

  • 如何取得表中字段的属性?

    2010-01-18 20:52:00
  • JavaScript中实现字符串的取左取右(实现left和right功能)

    2009-07-20 12:39:00
  • 带你深入了解MySQL语句优化的基本原则

    2008-11-27 17:00:00
  • FCKeditor新版本发布,并更名为CKeditor

    2009-09-08 13:09:00
  • asp下用OracleInProcServer完成对Oracle的连接和操作

    2008-04-13 07:10:00
  • DBA经验:如何进行MySQL数据库表的故障检测

    2009-02-12 17:37:00
  • Oracle PL/SQL入门案例实践

    2010-07-18 13:13:00
  • Oracle 9i产品文档

    2010-07-16 13:35:00
  • 兼容IE,FF的弹出层登陆界面代码

    2008-01-04 12:13:00
  • SQLServer中用T—SQL命令查询一个数据库中有哪些表的sql语句

    2012-07-11 15:28:50
  • DSN和DSN-Less两种数据库连接方式哪一种更好?

    2009-10-28 18:26:00
  • 重新编译PLSQL中的无效对象或者指定的对象 的方法

    2009-02-26 10:41:00
  • 胜过语言的图形符号

    2009-05-06 12:43:00
  • 简单仿LightBox效果

    2008-09-19 21:35:00
  • jQuery打造动态渐变按钮

    2010-05-10 20:21:00
  • 又为ajax上传工具重新写了一个服务器端上传程序

    2009-12-21 14:30:00
  • asp如何制作一个倒计时的程序?

    2010-06-29 21:25:00
  • eWebEditor不支持IE8/IE7的解决方法

    2010-02-28 10:27:00
  • 新功能的帮助与破坏

    2010-01-17 10:15:00
  • ORACLE LATERAL-SQL-INJECTION 个人见解

    2009-03-04 10:34:00
  • asp之家 网络编程 m.aspxhome.com