SqlServices.GenerateSessionStateScripts 方法     
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成用于安装或移除会话状态的 SQL 脚本。 脚本将引用由数据库参数指示的数据库。
public:
 static System::String ^ GenerateSessionStateScripts(bool install, System::Web::Management::SessionStateType type, System::String ^ customDatabase);public static string GenerateSessionStateScripts(bool install, System.Web.Management.SessionStateType type, string customDatabase);static member GenerateSessionStateScripts : bool * System.Web.Management.SessionStateType * string -> stringPublic Shared Function GenerateSessionStateScripts (install As Boolean, type As SessionStateType, customDatabase As String) As String参数
- install
- Boolean
如果为 true,则生成安装指定功能的脚本;如果为 false,则生成移除功能的脚本。
- type
- SessionStateType
SessionStateType 值之一,指定为其生成脚本的会话状态的类型。
- customDatabase
- String
生成的脚本中使用的 SQL Server 数据库的名称。
返回
返回生成的脚本代码。
例外
类型是 Custom 并且未提供 customDatabase 值,或者类型是 Temporary 或 Persisted 并且 customDatabase 值不为空。