看看我的错误在哪里

cnhawk386 2005-09-11 05:58:43
看看我的错误在哪里,技术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]标准表达式中数据类型不匹配 

数据库定义的相关表的字段均为文本型
--
...全文
61 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

1,451

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计/Flash/Silverlight 开发 图象工具使用
社区管理员
  • 图象工具使用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧