我正在使用WebMatrix 2.0 RC进行开发并且喜欢它。我确定数据库设置正确,但出现此错误:
Microsoft VBScript 运行时
错误“800a01b6”
对象不支持此属性或方法:'id'
/myfile.asp,第 24 行
我的文件.ASP
<%@ Language="VBScript" %>
<%
set db = Server.Createobject("ADODB.Connection")
db.open "Provider=Microsoft.SQLSERVER.CE.OLEDB.4.0;Data Source=" & server.mappath("/App_Data/databasefile.sdf")
%>
<%
set grs = Server.CreateObject("ADODB.recordset")
grs.Open "SELECT * FROM gells", db
do until grs.EOF
for each x in grs.Fields
response.write("<table style='margin-bottom:8px;'><tr><td style='vertical-align:top; padding-top:4px;'><img src='gells/uploads/gelthumbs/" & x.id & "_gelthumb.jpg' style='border:1px solid #FFFFFF;' /></td><td style='vertical-align:top; padding-left:4px; text-align:justify;'><strong>" & x.title & "</strong><br />" & x.info & "</td></tr><tr><td colspan='2' style='text-align:right; padding-top:4px;'><a href='gells.php?gelsid=" & x.id & "' ><img src='gells/viewgell.png' style='border:none;' /></a></td></tr></table>")
next
grs.MoveNext
loop
grs.close
%>