看看我的错误在哪里,技术ASP+DreamweaverMX 简体中文版
以下为出错页面的代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/score.asp" -->
<%
Dim tkcxz__tid1
tkcxz__tid1 = "1000"
If (request.form("tid"
<> ""
Then
tkcxz__tid1 = request.form("tid"
End If
%>
<%
Dim tkcxz
Dim tkcxz_numRows
Set tkcxz = Server.CreateObject("ADODB.Recordset"
tkcxz.ActiveConnection = MM_score_STRING
tkcxz.Source = "SELECT * FROM teach,course WHERE teach.crid=course.crid and
tid=" + Replace(tkcxz__tid1, "'", "''"
+ ""
tkcxz.CursorType = 0
tkcxz.CursorLocation = 2
tkcxz.LockType = 1
tkcxz.Open()
tkcxz_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = -1
Repeat1__index = 0
tkcxz_numRows = tkcxz_numRows + Repeat1__numRows
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<%
While ((Repeat1__numRows <> 0) AND (NOT tkcxz.EOF))
%>
<table width="69%" height="25" border="1">
<tr>
<td> <%=(tkcxz.Fields.Item("crid"
.value)%> </td>
<td><%=(tkcxz.Fields.Item("crname"
.value)%></td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
tkcxz.MoveNext()
Wend
%>
</body>
</html>
<%
tkcxz.Close()
Set tkcxz = Nothing
%>
运行出错提示为:
Microsoft VBScript 编译器错误 错误 '800a03f6'
缺少 'End'
/iisHelp/common/500-100.asp,行242
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e07'
[Microsoft][ODBC Microsoft Access Driver] 标准表达式中数据类型不匹配。
/tkcxz.asp,行20
此页建立的记录集如下
名称 tkcxz
连接 score
SQL
SELECT *
FROM teach,course
WHERE teach.crid=course.crid and tid=tid1
变量
名称 默认值 运行值
tid1 1000 request.form("tid"
测试时出错提示为:
[Microsoft][ODBC Microsoft Acess Driver]标准表达式中数据类型不匹配
数据库定义的相关表的字段均为文本型
--