主题:  看看我的错误在哪里

cnhawk386

职务:普通成员
等级:1
金币:0.0
发贴:38
#12005/9/11 17:51:10
看看我的错误在哪里,技术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]标准表达式中数据类型不匹配 

数据库定义的相关表的字段均为文本型



缺缺

职务:管理员
等级:8
金币:41.0
发贴:9620
#22005/9/12 9:05:10
文本型需要加引号