上传程序出现一个错误,请各位大哥帮忙看看
UP.ASP
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="OpenDB.inc"-->
<!--#include file="myPrg.asp" -->
<%Showtitle("增加记录")%>
<html>
<head>
<META http-equiv=Content-Type content="text/html; chars1et=GB2312"><LINK
href="images/global.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2600.0" name=GENERATOR><LINK
href="images/global.css" type=text/css rel=stylesheet>
<title>增加记录</title>
</head>
<body>
<p ALIGN="CENTER">[ <a href="manage.asp">个人记录修改</a> | <a href=" javascript:history.go(-1)">主界面</a>
| <a href=" javascript:history.go(-1)">返回</a> ] </p>
<form action="save.asp" method="post" enctype="multipart/form-data" name="form1">
<table width="59%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td width="14%" height="30">姓名</td>
<td width="33%"><input name="username" type="text"></td>
<td width="15%">性别</td>
<td width="38%" align="left">
<input type="text" name="sex"></td>
</tr>
<tr align="center">
<td height="30">办公地址</td>
<td><input type="text" name="officeadress"></td>
<td>家庭地址</td>
<td align="left">
<input type="text" name="homeadress"></td>
</tr>
<tr align="center" height="30">
<td height="30">办公电话</td>
<td><input type="text" name="officephone"></td>
<td>家庭电话</td>
<td align="left">
<input type="text" name="homephone"></td>
</tr>
<tr align="center" height="30">
<td height="30">手机</td>
<td><input type="text" name="handphone"></td>
<td>电子油箱</td>
<td align="left">
<input type="text" name="e_adress"></td>
</tr>
<tr align="center" height="30">
<td height="30">个人网页</td>
<td><input type="text" name="webadress"></td>
<td>OICQ号码</td>
<td align="left"><input type="text" name="QQnumb"></td>
</tr>
<tr align="center" height="30">
<td height="30">身份证号码</td>
<td><input type="text" name="shenfenzheng"></td>
<td> </td>
<td> </td>
</tr>
<tr align="center" height="30">
<td height="30">个人照片</td>
<td colspan="3" align="left">
<input name="file" type="file" size="35"></td>
</tr>
<tr align="center" height="30">
<td height="30"> </td>
<td align="right">
<input type="submit" name="Submit" value="提交"></td>
<td> </td>
<td align="left">
<input type="submit" name="Submit2" value="重设"></td>
</tr>
</table>
</form>
<p ALIGN="CENTER"> </p>
<!--#include file="copyright.asp" -->
</body>
</html>
问题点数:20、回复次数:4Top
1 楼iuhxq(小灰)回复于 2004-09-03 09:56:26 得分 20
加我MSN,我发给你自我感觉不错的代码
iuhxq@hotmail.comTop
2 楼baby97(小雕(Asp→.Net中...)回复于 2004-09-03 09:56:55 得分 0
晕了!
弄这么长的代码还没有说是哪错了,怎么查啊?!Top
3 楼iuhxq(小灰)回复于 2004-09-03 09:57:03 得分 0
http://asp2004.net/dvbbs/dispbbs.asp?boardID=3&ID=55&page=1
这里有,自己下载吧,呵呵。Top
4 楼milanzhiqiou(米兰之秋)回复于 2004-09-03 09:57:08 得分 0
SAVE.ASP
<!--#include file="OpenDB.inc"-->
<%
username=request("username")
sex=request("sex")
officeadress=request("officeadress")
homeadress=request("homeadress")
officephone=request("officephone")
homephone=request("homephone")
handphone=request("handphone")
e_adress=request("e_adress")
webadress=request("webadress")
QQnumb=request("QQnumb")
shenfenzheng=request("shenfenzheng")
FormSize = Request.TotalBytes
FormData = Request.BinaryRead(FormSize)
Image=ImageUp (FormSize,Formdata)
sql="SELECT * FROM classtel"
rs2.Open sql,conn,1,3
rs2.AddNew
rs2("name") = username
rs2("sex")=sex
rs2("officeadress")=officeadress
rs2("homeadress")=homeadress
rs2("officephone")=officephone
rs2("homephone")=homephone
rs2("handphone")=handphone
rs2("e_adress")=e_adress
rs2("webadress")=webadress
rs2("QQnumb")=QQnumb
rs2("shenfenzheng")=shenfenzheng
rs2("imagedata") = NULL
rs2("photo").appendchunk Image
rs2.Update
rs2.Close
set rs2=nothing
response.redirect"txl.asp"
%>
<%
function ImageUp(formsize,formdata)
bncrlf=chrb(13) & chrb(10)
divider=leftb(formdata,instrb(formdata,bncrlf)-1)
datastart=instrb(formdata,bncrlf&bncrlf)+4
dataend=instrb(datastart+1,formdata,divider)-datastart
imageup=midb(formdata,datastart,dataend)
end function
%>
数据库中除了photo类型为OLE对象,其它都是文本,上传保存时出现错误:
Microsoft OLE DB Provider for ODBC Drivers 错误 '80004005'
[Microsoft][ODBC Microsoft Access Driver]行中有错误
save.asp,行35Top




