当前位置:首页 > 互联网数据库(00911) > 正文内容

请编写一个ASP程序,向用户输出数据表“Mydata”的全部内容
高老师2年前 (2024-03-26)互联网数据库(00911)8

请编写一个ASP程序,向用户输出数据表“Mydata”的全部内容

(1)要求网页显示格式如下:上表只是示例格式演示(姓名、年龄、身高是示例数据表的字段),并非数据库中的实际字段。
(2)连接数据源时请用:DSN=Mydsn,UID=test,pwd=test。

<%setconn=server.createobject(″adodb.connection″)setrs=server.createobject(″adodb.recordset″)strSQL=″select*fromMydata″conn.open″dsn=mydata;uid=test;pwd=test″rs.Openstrsql,conn,1response.write″″fori=0tors.fields.count-1response.write″″nextresponse.write″″recordcount=1dowhilenotrs.eofresponse.write″″fori=0tors.fields.count-1response.write″″nextresponse.write″″rs.movenextrecordcount=recordcount+1loopresponse.write″记录编号″&rs(i).name&″″&recordcount&″″&rs(i)&″″%>

扫描二维码免费使用微信小程序搜题/刷题/查看解析。

版权声明:本文由翰林刷题小程序授权发布,如需转载请注明出处。

本文链接:https://doc.20230611.cn/post/525230.html

分享给朋友: