asp连接数据库代码实例(14)
发布时间:2021-06-06
发布时间:2021-06-06
asp 连接数据库代码实例
Class FileInfo
dim FormName,FileName,FilePath,FileSize,FileType,FileStart
Private Sub Class_Initialize
FileName = ""
FilePath = ""
FileSize = 0
FileStart= 0
FormName = ""
FileType = ""
End Sub
Public function SaveAs(FullPath)
dim dr,ErrorChar,i
SaveAs=true
if trim(fullpath)="" or FileStart=0 or FileName="" or right(fullpath,1)="/" then exit function
set dr=CreateObject("Adodb.Stream")
dr.Mode=3
dr.Type=1
dr.Open
Data_5xsoft.position=FileStart
Data_5xsoft.copyto dr,FileSize
dr.SaveToFile FullPath,2
dr.Close
set dr=nothing
SaveAs=false
end function
End Class
</SCRIPT>
删除文件和记录
<%
if request("action")="manage" then
call manage()
end if
if request("action")="edit" then
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from biao where id="&id&""
rs.open sql,conn,1,1
call edit()