菜鸟的问题:
windows98,sql server2000.在d盘下wwwroot中,有数据库ly_data.mdf(库中的表:admindata 表中有记录2条),并且有database下mybook.dsn.
有以下代码,却不能显示记录级中的内容.
代码是:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>bbs</title>
</head>
<body>
<%userspace=" "
<%
dsnpath=server.mappath("/database/mybook.dsn"
set conn=server.CreateObject("ADODB.Connection"
conn.open "FILEDSN="&dsnpath
fhsql="select *from admindat"
set RS=conn.execute(fhsql)
for id=0 to RS.fields.count-1
response.Write RS("id"
.name &userspace
next
response.Write("<br>"
do while not RS.EOF
for id=0 to RS.fields.count-1
response.Write RS("id"
&userspace
next
response.Write("<br>"
RS.Movenext
loop
RS.close
conn.close
set conn=Nothing
%>
</body>
</html>
请教高手:错在哪里?
期待ing.......