asp +access这个代码同时上传word和提交表单出错该怎么办,求解
studentfiledata=MyRequest("studentfiledata")exp_title=MyRequest("exp_title")
exptitle=Rtrim(Ltrim(exp_title))
exptitle=fenci(exptitle)
exp_title=MyRequest("exp_title")
exp_course=MyRequest("exp_course")
expcourse=Rtrim(Ltrim(exp_course))
expcourse=fenci(expcourse)
exp_course=MyRequest("exp_course")
course_number=MyRequest("course_number")
coursenumber=Rtrim(Ltrim(course_number))
course_number=MyRequest("course_number")
exp_introduction=MyRequest("exp_introduction")
expintroduction=Rtrim(Ltrim(exp_introduction))
exp_introduction=MyRequest("exp_introduction")
exp_date=MyRequest("exp_date")
expdate=Rtrim(Ltrim(exp_date))
exp_date=MyRequest("exp_date")
exp_people=MyRequest("exp_people")
exppeople=Rtrim(Ltrim(exp_people))
exp_people=MyRequest("exp_people")
student_number=MyRequest("student_number")
studentnumber=Rtrim(Ltrim(student_number))
student_number=MyRequest("student_number")
student_college=MyRequest("student_college")
student_major=MyRequest("student_major")
studentmajor=Rtrim(Ltrim(student_major))
student_major=MyRequest("student_major")
student_grade=MyRequest("student_grade")
student_class=MyRequest("student_class")
exp_location=MyRequest("exp_location")
explocation=Rtrim(Ltrim(exp_location))
explocation=fenci(explocation)
exp_location=MyRequest("exp_location")
exp_collaborator=MyRequest("exp_collaborator")
expcollaborator=Rtrim(Ltrim(exp_collaborator))
expcollaborator=expcollaborator+" "
exp_collaborator=MyRequest("exp_collaborator")
exp_tutor=MyRequest("exp_tutor")
exptutor=Rtrim(Ltrim(exp_tutor))
exp_tutor=MyRequest("exp_tutor")
filesize = lenb(filedata)
if filesize = 0 then
Msg = Msg & "上传文件:没有<br>"
else
filename = GetFileName("filedata")
filename=replace(filename," ","")
''限制加入的类型 *.asp
file_ctype = GetContentType("filedata")
end if
if UploadSize=true and UploadType=true and exp_title<>"" and student_number<>"" then
set brs=myconn.execute("select * from baogao where exp_title='"&exptitle&"'")
if brs.eof then
'保存数据到baogao
path = "files/"
bsql = "insert into baogao(exp_title,student_number,exp_date,exp_location,exp_collaborator,exp_tutor,path) values ('"&exptitle&"','"&studentnumber&"','"&expdate&"','"&explocation&"','"&expcollaborator&"','"&exptutor&"','"&path&filename&"')"
'response.write bsql
'response.end
myconn.execute(bsql)
call savetofile(studentfiledata,path,filename)
set crs=myconn.execute("select * from course where exp_title='"&exptitle&"'")
if crs.eof then
'保存数据到course
csql = "insert into course(exp_title,exp_course,course_number,exp_introduction) values ('"&exptitle&"','"&expcourse&"','"&coursenumber&"','"&expintroduction&"')"
myconn.execute(csql)
end if
set ers=myconn.execute("select * from expmessage where exp_title='"&exptitle&"'")
if ers.eof then
'保存数据到course
esql = "insert into expmessage(exp_title,course_number,student_grade,student_class,exp_location,exp_date,exp_tutor) values ('"&exptitle&"','"&coursenumber&"',''"&student_grade&"','"&student_class&"','"&explocation&"','"&expdate&"','"&exptutor&"')"
myconn.execute(csql)
end if
set srs=myconn.execute("select * from student where student_number='"&student_number&"'")
if srs.eof then
'保存数据到student
ssql = "insert into student(student_number,exp_people,student_college,student_major,student_grade,student_class) values ('"&studentnumber&"','"&exppeople&"','"&student_college&"','"&studentmajor&"','"&student_grade&"','"&student_class&"')"
end if
myconn.execute(ssql)
if len(filedata)<>0 then
Call SavetoFile(filedata,basepath,filename)
end if
end if
myconn.close()
set myconn = nothing