- 命令行
stsadm -o export -url http://Server:port/BBB/BBB1 -includeusersecurity -filename d:\test.cmp
把BBB站点下的BBB1子站点导出
stsadm -o import -url http://Server:port/IT/BBB1 -includeusersecurity -filename d:\test.cmp
把上面导出的子站点导入到IT子站点下,形成新的子站点。
- MOSS对象模型
- Export
SPExportSettings spExportSettings = new SPExportSettings();
spExportSettings.AutoGenerateDataFileName = true;
spExportSettings.ExportMethod = SPExportMethodType.ExportAll;
spExportSettings.SiteUrl = "http://Server:port/BBB/BBB1";
spExportSettings.IncludeSecurity = SPIncludeSecurity.All;
spExportSettings.IncludeVersions = SPIncludeVersions.All;
SPExport spExport = new SPExport(spExportSettings);
spExport.Run();
- Import
SPImportSettings spImportSettings = new SPImportSettings();
spImportSettings.BaseFileName = Path.GetFileName("生成的文件全路径");
spImportSettings.FileLocation = Path.GetDirectoryName("生成的文件全路径");
spImportSettings.SiteUrl = "http://Server:port/IT/BBB1";
spImportSettings.RetainObjectIdentity = false;
spImportSettings.IncludeSecurity = SPIncludeSecurity.All;
spImportSettings.UpdateVersions = SPUpdateVersions.Append;
spImportSettings.UserInfoDateTime = SPImportUserInfoDateTimeOption.ImportAll;
SPImport import = new SPImport(spImportSettings);
import.Run();
在使用SPSiteDataQuery和SPQuery查询时,当用Query构造查询语句时,使用Where查询不数据。
语句:
"<Where><Eq><FieldRef Name=\"ID\" /><Value Type=\"Text\">11</Value></Eq></Where>"
错误出在<Value Type=\"Text\">,因为ID是Counter类型,使用Text肯定是查询不出数据,MOSS查询是不会自动做类型转换的。
正确:
"<Where><Eq><FieldRef Name=\"ID\" /><Value Type=\"Counter\">11</Value></Eq></Where>"
总结:
使用SPSiteDataQuery和SPQuery查询时,字段的类型一定要写正确。否则出不来数据都不知道是语句写错了,还是什么原因。
摘要: using System;using System.Collections.Generic;using System.Text;using Microsoft.SharePoint;using Microsoft.SharePoint.Administration;using Microsoft.Office.Server;using Microsoft.Office.Server.Adminis...
阅读全文
- 定义2个存储帖子的内容类型,一个是继承于文件夹的,一个是继承于普通列表的。
- 定义列表Feature
- 定义Mastpage,和站点的default.aspx页面。
- 定义站点定义文件one.xml,创建站点时自动激活Feature,和创建列表。
- 编写后台代码
- 创建子频道(子站点)代码。
- 创建专家组。
- 创建用户组。
- 分配专家组和用户组权限。
- 帖子一对一代码。
- 增加主题。
- 恢复主题。
- 杂七杂八的工作一堆....
下周把一些开发部署后的截图发上来。
SPList.Items.Add(String, SPFileSystemObjectType, String)函数中参数SPFileSystemObjectType可以是 Folder与File,如果增加的内容类型是Folder,而指定的是File就会导致“带链接的主题”和“链接到主题”显示为数字,所以如果增加的是文件夹类型,函数中的参数一定指定为Folder。

- 第一种情况
HRESULT: 0x80040E14 when adding items to SharePoint
If you receive HRESULT: 0x80040E14 when trying to add an item like announcements/webpart/saving documents before running going through the Microsoft steps you have need to check the following
-
Your SQL server data drive is not full
-
Your mdf and ldf database files havent reached there full allocated size
-
Your database files are set to increase when full.
If you are still having this issue after checking the above follow the step listed in this link
http://support.microsoft.com/kb/841216
- 第二种情况
给不能插入值的列进行插入和更新操作了。建议只给ListItem["Title"] = "你的值"赋值,再运行你的代码。
发布在http://www.codeplex.com/DocumentDiscussion
新开发一个文档讨论板
过段时间准备把用MOSS做的一个沟通平台整理出来,发布出来。敬请期待,呵呵。。。。。。
描述 2007年 MicrosoftOffice 服务器服务包 1 和 2007年 MicrosoftOffice 服务器语言包 ServicePack 1
2007 Microsoft Office 套件 Service Pack 1 (SP1)
Windows SharePoint Services 3.0 Service Pack 1 (SP1)
Windows SharePoint Services 3.0 Language Pack Service Pack 1 (SP1)
2007 Microsoft Office Servers Service Pack 1 (SP1)
2007 Microsoft Office Servers Language Pack Service Pack 1 (SP1)
Microsoft Office SharePoint Designer 2007 Service Pack 1 (SP1)
Microsoft Office SharePoint Designer Language Pack 2007 Service Pack 1 (SP1)
Microsoft Office Visio 2007 Service Pack 1 (SP1)
Microsoft Office Project 2007 Service Pack 1 (SP1)
Microsoft Office 兼容包 Service Pack 1 (SP1)
Microsoft Office 语言包 2007 Service Pack 1 (SP1)
Microsoft Office 校对工具 2007 Service Pack 1 (SP1)
Microsoft Office Visio Language Pack 2007 Service Pack 1 (SP1)
Microsoft Office Project Language Pack 2007 Service Pack 1 (SP1)
Microsoft Office Visio Viewer 2007 Service Pack 1 (SP1)
2007 Microsoft Office system 的 Microsoft Office 2003 Web 组件 Service Pack 1 (SP1)
Microsoft Office PowerPoint Viewer 2007 Service Pack 1 (SP1)