Exchange Server关于文档属性扩充

2008-02-23 09:39:11来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

1,自定义一个内容类如:urn:contentclasses:document1
其中有自定义属性:Clicknumber
2,所建的文档的内容类定义为1的。
3,建立一个窗体注册
urn:schemas-microsoft-com:office:forms#contentclass 为1建立的urn:contentclasses:document1
urn:schemas-microsoft-com:office:forms#cmd 为*
urn:schemas-microsoft-com:office:forms#formurl 为chkopen.asp
urn:schemas-microsoft-com:office:forms#executeurl 为chkopen.asp

urn:schemas-microsoft-com:office:forms#binding server

4,list.asp
<%
Function AddQuotes(strValue)
Const QUOTE = """"
AddQuotes = _
QUOTE _
& Replace(strValue, QUOTE, QUOTE & QUOTE) _
& QUOTE
End Function
Dim cnn 'As ADODB.Connection
Dim rst 'As ADODB.Recordset
Dim urlFld 'As String
Dim strSQL 'As String

urlFld ="http://aaa.com/fld1/"
Set cnn = CreateObject("ADODB.Connection")
With cnn
.Provider = "exoledb.datasource"
.Open urlFld
End With
strSQL = "Select " & _
AddQuotes("DAV:displayname") & ", " & _
AddQuotes("DAV:contentclass") & ", " & _
AddQuotes("Clicknumber") & ", " & _
AddQuotes("DAV:href")
strSQL = strSQL & _
" FROM SCOPE('SHALLOW traversal of " & _
AddQuotes(urlFld) & "')"
strSQL = strSQL & _
" WHERE " & AddQuotes("DAV:contentclass") & _
" = 'urn:contentclasses:document1'"
strSQL = strSQL & _
" ORDER BY " & AddQuotes("DAV:displayname")
Set rst = CreateObject("ADODB.Recordset")
With rst
.Open strSQL, cnn
End With


response.Write "<table>"

Do Until rst.EOF
response.Write "<tr><td width=200>"
%>
<a href="../fld1/<%=rst.Fields("DAV:displayname")%>"></a>
<%
response.Write "</td></tr>"
rst.MoveNext
Loop

response.Write "</table>"
rst.Close
cnn.Close
Set rst = Nothing
Set cnn = Nothing
%>


5,chkopen.asp

<%
Dim rec
dim ii
Dim cnn
Dim strUrl

strDataUrl = request.querystring("dataurl")
Set cnn = CreateObject("adodb.connection")
With cnn
.Provider = "exoledb.datasource"
.Open strDataUrl
End With
Set rec = server.CreateObject("adodb.record")
rec.Open strDataUrl, cnn, 3 'adModeReadWrite
ii=rec.fields("Clicknumber")
rec.fields("Clicknumber")=ii 1
rec.fields.update
rec.close
%>
open item ........


运行list.asp
点击文件时调用chkopen.asp 使Clicknumber 1同时打开该文件.其URL由strDataUrl = request.querystring("dataurl")完成.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:ASP中GetRows的用法详解!

下一篇:杜绝入侵:八大法则防范ASP网站漏洞