function.asp

来自「一个用asp和sql server开发的网上办公系统」· ASP 代码 · 共 32 行

ASP
32
字号
<%
'******************
'取得刚刚添加公告的编号
'******************	
Function GetBulletinId()
	set rsBulletin=server.CreateObject("ADODB.recordset")
	    strSQL="select Id from gongwen order by Id Desc"
	    rsBulletin.Open strSQL,conn,1,1	
	If Not rsBulletin.eof Then
		GetBulletinId=rsBulletin("Id")
	ELse
		GetBulletinId=0
	End If
	rsBulletin.close	
End Function
'******************
'将上传文件信息写入数据库
'******************	
Sub UpdateUpload(AreaType,ItemId)
	UploadFileCount=Session("UploadFileCount")
	UploadFileDir=Session("UploadFileDir")
	If UploadFileCount>0 Then		
	   FileDir=split(UploadFileDir,"*") '获得上传文件路径
	 for i=1 to ubound(FileDir)
		InputFileDir=FileDir(i)
		strSQL="insert into gongUpload (UpPath,Type,ItemId) values('"&InputFileDir&"',"&AreaType&","&ItemId&")"
		conn.execute strsql   
	  Next   		
	End If
End Sub
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?