总结学习的程序结构
1 典型三层 数据表-----------> common类库-------> dataAccess 类库--------> business类库-------->web表示思想:首先设计好数据表,然后将表映射成common类(数据缓存在内存中),其次编写数据访问层dataAccess,访问数据库的参数从common类中取得,而common类中参数的值从 WEB 层中取得再写business层,该层访问dataAccess层最后编写web,该层不能直接访问dataAccess层,而是通过business层来实现的分析:首先设计好数据表(表名mrBranch:字段BranchID、BranchName、SimpleCode、DelFlag)然后将表映射成common类库的MrBran
返回存儲過程的多個輸出字段
存儲過程:CREATE procedure User_Login @user_id varchar(20),@password varchar(50),@Return_Status char(1) output,@user_name varchar(20) output,@dept varchar(20) output,@duty varchar(20) output,@Evaluate varchar(1)='N' outputAS declare @dept_id varchar(4)declare @duty_id varchar(4)select @dept=''select @duty=''select @user_name=''select @return_status='0' --不知明錯誤if exists(select user_id from user_list where user_id=@user_id)beginif exists(select user_id from user_list where user_id=@user_id an
存儲過程解密SQL
存儲過程解密SQLif exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_decrypt]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)drop procedure [dbo].[sp_decrypt]GO/*--破解函數,視圖,程儲過程,触發器,限于SQLSERVER2000--作者:J9988--*//*--使用示例--解密指定存儲過程 exec sp_decrypt 'AppSP_test'--解密所有的存儲過程declare tb cursor forselect name from sysobjects where xtype='P' and status>0 and name<>'sp_decrypt'declare @name sysnameopen tbfetch next from tb into @namewhile @@fet