无组件上传的问题
Microsoft VBScript 运行时错误 错误 '800a01b6'
对象不支持此属性或方法: 'sortid'
/admin/Ex_DataBase.asp,行28
相关代码如下:
<form method=post ENCTYPE="multipart/form-data" action="Ex_DataBase.asp">
<p>文件:
<input type="file" name="myfile">
<br>
分类:
<input type="radio" name="sortid" value="1">
高中
<input type="radio" name="sortid" value="2">
初中
<br />
<input type="submit" />
</p>
</form>
========================================
ex_database.asp
....................................
If upload.ErrMsg = "" then
Response.Write ("<BR><BR>上传:<BR>")
For Each formName In upload.Files ''列出所有上传了的文件
Set file = upload.Files(formName) ''生成一个文件对象
binary = file.GetBinary()
RS.Open "Upload", Conn, 1, 2
RS.AddNew
RS("ContentType") = file.FileType
RS("Content") = binary
RS("FileName") = file.FileName
RS("FileSize") = file.FileSize
RS("sort")=file.sortid //该行报错
RS.Update
uploadID = RS("UploadID")
RS.Close
...................................................