基于SQL Server 的Exception Handling - PART II
2008-12-06 10:15:28 来源:WEB开发网6. Programs
class Program
{
static void Main(string[] args)
{
Utility.Clear();
if (Utility.CreateUser("Artech"))
{
Console.WriteLine("The user "{0}" has been sucessully created!", "Artech");
}
if (Utility.CreateUser("Artech"))
{
Console.WriteLine("The user "{0}" has been sucessully created!", "Artech");
}
if (Utility.CreateRole("Administrator"))
{
Console.WriteLine("nThe role "{0}" has been sucessully created!", "Administrator");
}
if (Utility.CreateRole("Administrator"))
{
Console.WriteLine("The role "{0}" has been sucessully created!", "Administrator");
}
if (Utility.AddUserInRole("Artech", "Administrator"))
{
Console.WriteLine("nThe user "{0}" has been successfully added in the role "{1}"", "Artech", "Administrator");
}
if (Utility.AddUserInRole("Dave Crane", "Administrator"))
{
Console.WriteLine("The user "{0}" has been successfully added in the role "{1}"", "Dave Crane", "Administrator");
}
if (Utility.AddUserInRole("Artech", "Super Administrator"))
{
Console.WriteLine("The user "{0}" has been successfully added in the role "{1}"", "Artech", "Super Administrator");
}
if (Utility.AddUserInRole("Artech", "Administrator"))
{
Console.WriteLine("The user "{0}" has been successfully added in the role "{1}"", "Artech", "Administrator");
}
}
7. 最终执行结果
- ››sql server自动生成批量执行SQL脚本的批处理
- ››sql server 2008亿万数据性能优化
- ››SQL Server 2008清空数据库日志方法
- ››sqlserver安装和简单的使用
- ››SQL Sever 2008 R2 数据库管理
- ››SQL SERVER无法安装成功,sqlstp.log文件提示[未发...
- ››Sql Server中通过父记录查找出所有关联的子记录
- ››基于IP地址的vsftp服务器
- ››SqlServer触发器、存储过程和函数
- ››SQL Server 中的事务(含义,属性,管理)
- ››Sqlite数据库插入和读取图片数据
- ››Sql server 2005拒绝了对对象 'xx表' (数...
更多精彩
赞助商链接