[求助] 标准表达式中数据类型不匹配,怎么办
在写内容编辑的过程中出现了错误:
错误如下:
错误 '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
我想了好久了,都找不出原因....