首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴mxbing1984的代码贴全部
Create Function [dbo].[fn_BitTest32](@num int,@bitpostion int)
Returns bit
As
Begin
--测试某位是否为真
Declare @Rst bit=0
Declare @bit int 
If (@bitpostion>=1 And @bitpostion<=31)
Begin 
Set @bit=Power(2,@bitpostion)
If((@num & @bit)=0)
        Set @Rst=0
......................
阅读全部 | 2014年8月23日 17:22
Create Procedure [dbo].[sp_Converter](@TransType tinyint,@sInText nVarchar(4000),@sOutText nVarchar(4000) OUTPUT) 
AS
Begin
Declare @App int
Declare @Doc int
Declare @Err int
Declare @Selection int

Exec @Err = sp_OACreate 'Word.Application', @App OUT
If @err<>0 goto lb_err
Exec @Err = sp_OACreate 'Word.Document', @Doc OUT
If @err<>0 goto lb_err
......................
阅读全部 | 2014年8月23日 17:21
DECLARE @hr INT;
DECLARE @objExcel INT;
DECLARE @objWorkBooks INT;
DECLARE @objWorkBook INT;
DECLARE @objSheets INT;
DECLARE @objSheet INT;
DECLARE @objRange INT;
Declare @A INT


EXEC @hr = sp_OACreate 'Excel.Application',@objExcel OUTPUT;
EXEC @hr = sp_OASetProperty @objExcel,'Visible','True';
......................
阅读全部 | 2014年8月23日 17:20
Create Procedure sp_MSJZ(@N int)
As
Begin
If @N<3 or @N%2=0
Begin
Print '请输入大于2的奇数'
Return
End

--定义I,J行列和值
Declare @I int=1,@J int,@K int,@X int,@Y int,@T int,@R int

......................
阅读全部 | 2014年8月23日 17:20
Create Procedure sp_Upload(@path Varchar(200))
As
Begin
Set NoCount on
/*
Create Table myFile
(
ID int Identity(1,1),
filename Varchar(100),
files Varbinary(max)
)
*/
......................
阅读全部 | 2014年8月23日 17:19
1
mxbing1984