1
如何獲得有關SharePoint文檔的信息。如何使用AllDocs表獲取SharePoint文件創建者名稱?
- 創建
- 最後修改通過
我使用SharePoint內容數據庫的alldocs表,但無法找到它非常有幫助。
如何獲得有關SharePoint文檔的信息。如何使用AllDocs表獲取SharePoint文件創建者名稱?
我使用SharePoint內容數據庫的alldocs表,但無法找到它非常有幫助。
如果您正在觸摸alldocs表,則表示沒有使用對象模型。此外,它不被支持,通常是一個壞主意。以下是使用對象模型獲取相同信息的一些示例代碼:
using (SPSite site = new SPSite("http://your.sharepoint.server/"))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Documents"];
SPListItem item = list.Items[0];
string author = (string)item["Author"];
DateTime modified = (DateTime)item["Modified"];
}
}
您的問題的標題與身體根本不匹配?您是否試圖通過SharePoint API或數據庫獲取信息? – 2010-11-22 14:58:54
對不起,我最初希望使用對象模型,然後編輯問題,因爲我需要它使用alldocs表。不記得編輯標題。 – Faisal 2010-11-23 03:56:29