[求助] 标准表达式中数据类型不匹配,怎么办

lionhate 2006-02-27 02:59:52
在写内容编辑的过程中出现了错误:
错误如下:
错误 '80040e07' 标准表达式中数据类型不匹配。

mcn/c_dosave.asp,行99

文件如下:

Set g_objConn = Server.CreateObject("ADODB.Connection")
g_objConn.Open "Provider=Microsoft.Jet.Oledb.4.0;Data Source="&Server.MapPath(inc_database)

if birthday <> "0" then
strSQL = "INSERT INTO BasicInfo(ApplicationTime, ApplicantName, FirstName, LastName, Sex, BirthDay, Married, City, ZipCode, Address, BasicPhone, Email, OfficePhone, CellPhone) VALUES ('"
strSQL = strSQL & session("applicationTime") & "','"
strSQL = strSQL & applicantName & "','"
strSQL = strSQL & firstName & "','"
strSQL = strSQL & lastName & "','"
strSQL = strSQL & sex & "','"
strSQL = strSQL & birthday & "','"
strSQL = strSQL & married & "','"
strSQL = strSQL & city & "','"
strSQL = strSQL & zipCode & "','"
strSQL = strSQL & address & "','"
strSQL = strSQL & basicphone & "','"
strSQL = strSQL & email & "','"
strSQL = strSQL & officephone & "','"
strSQL = strSQL & cellphone & "')"
else
strSQL = "INSERT INTO BasicInfo(ApplicationTime, ApplicantName, FirstName, LastName, Sex, Married, City, ZipCode, Address, BasicPhone, Email, OfficePhone, CellPhone) VALUES ('"
strSQL = strSQL & session("applicationTime") & "','"
strSQL = strSQL & applicantName & "','"
strSQL = strSQL & firstName & "','"
strSQL = strSQL & lastName & "','"
strSQL = strSQL & sex & "','"
strSQL = strSQL & married & "','"
strSQL = strSQL & city & "','"
strSQL = strSQL & zipCode & "','"
strSQL = strSQL & address & "','"
strSQL = strSQL & basicphone & "','"
strSQL = strSQL & email & "','"
strSQL = strSQL & officephone & "','"
strSQL = strSQL & cellphone & "')"
end if

' Response.Write strSQL
g_objConn.Execute(strSQL)
set rs=g_objConn.execute("SELECT MAX(ApplicationID) AS appID FROM BasicInfo")
applicationID = rs("appID")

*****************************************************************************
99行来了...
*****************************************************************************

g_objConn.Close()
g_objConn.Open()
ed_info= split(session("ed"),"|")
FOR i = 0 to ubound(ed_info) - 1
edd_info= split(ed_info(i),",")
FOR j = 0 to ubound(edd_info)
educationdetail(j) = edd_info(j)
NEXT
item_count = ubound(a_apply_grst)
FOR a = 0 TO item_count - 1
IF a_apply_grst(a) = educationdetail(4) THEN
educationdetail(4) = a
END IF
NEXT

item_count = ubound(a_apply_edle)
FOR b = 0 TO item_count - 1
IF a_apply_edle(b) = educationdetail(3) THEN
educationdetail(3) = b
END IF
NEXT

if educationdetail(1) = "0" OR educationdetail(2) ="0" then
strSQL = "INSERT INTO EducationInfoDetails(ApplicationID, EducationID, SchoolName, EducationLevel, GraduationStatus, Speciality) VALUES ('"
strSQL = strSQL & applicationID & "','"
strSQL = strSQL & i + 1 & "','"
strSQL = strSQL & educationdetail(0) & "','"
strSQL = strSQL & educationdetail(3) & "','"
strSQL = strSQL & educationdetail(4) & "','"
strSQL = strSQL & educationdetail(5) & "')"
else
strSQL = "INSERT INTO EducationInfoDetails(ApplicationID, EducationID, EntranceDate, GrduationDate, SchoolName, EducationLevel, GraduationStatus, Speciality) VALUES ('"
strSQL = strSQL & applicationID & "','"
strSQL = strSQL & i + 1 & "','"
strSQL = strSQL & educationdetail(0) & "','"
strSQL = strSQL & Replace(Replace(educationdetail(1),"年", "-"), "月", "") & "','"
strSQL = strSQL & Replace(Replace(educationdetail(2),"年", "-"), "月", "") & "','"
strSQL = strSQL & educationdetail(3) & "','"
strSQL = strSQL & educationdetail(4) & "','"
strSQL = strSQL & educationdetail(5) & "')"
end if
g_objConn.Execute(strSQL)
NEXT
set rs=g_objConn.execute("SELECT * FROM EducationInfoDetails WHERE ApplicationID=" &applicationID)
Count = 0
Do While Not rs.Eof
Count = Count + 1
rs.MoveNext
Loop

我想了好久了,都找不出原因....
...全文
119 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
batistuta97 2006-02-27
  • 打赏
  • 举报
回复
applicationID = cstr(rs("appID"))
xxxyyyzzzhi 2006-02-27
  • 打赏
  • 举报
回复
你数据库里appid是什么类型的数据?
xxxyyyzzzhi 2006-02-27
  • 打赏
  • 举报
回复
applicationID = rs("appID")
这是99行吧?
lionhate 2006-02-27
  • 打赏
  • 举报
回复
在线等待答复中,先对所有来看帖的说声谢谢~!

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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