摘要:
CREATE FUNCTION [dbo].[FormatDate] (@date as datetime, @formatstring as varchar(100) ) RETURNS varchar(100) AS BEGIN declare @datestring as varchar(100) set @datestring=@formatstring --year set @d... 阅读全文
摘要:
CREATE FUNCTION [dbo].[Func_Split] ( @inputstr VARCHAR(max), @seprator VARCHAR(10) ) RETURNS @temp TABLE (A VARCHAR(200)) AS BEGIN DECLARE @i INT SET @inputstr = RTRIM(LTRIM(@inputstr)) SET ... 阅读全文
摘要:
DECLARE cur1 CURSOR SCROLL FOR SELECT DISTINCT xxx,xxx,xxx FROM xxx WHERE xxx='xxx' ORDER BY xxx OPEN cur1 FETCH NEXT FROM cur1 INTO @xxx,@xxx,@xxx WHILE @@fetch_status=0 BEGIN -- sql FETCH NE... 阅读全文
摘要:
Step1.将DB脱离可用性组 Step2.修改为简单恢复模式>收缩文件>修改回完整恢复模式 -- Truncate the log by changing the database recovery model to SIMPLE. ALTER DATABASE [DB] SET RECOVERY 阅读全文
摘要:
----恢复9月6号完全备份 RESTORE DataBase [DB] From Disk='D:\BackUp\DB_FULL20150906.BAK' with NORECOVERY, Move 'DB' to 'D:\SQLData\DB_Data.MDF',Move 'DB_log' to 'D:\SQLData\DB_log.LDF' ----恢复9月7号差异备份 RESTORE ... 阅读全文
摘要:
--backup Use [DBName] Declare @FullFileName Varchar(200) Declare @FileFlag varchar(20) Set @FileFlag='20'+convert(char(6),getdate(),12) Set @FullFileName='d:\BackUp\'+@FileFlag+'.BAK' BackUp DataBase... 阅读全文
摘要:
//方法一 下载word Response.ClearContent(); Response.ClearHeaders(); Response.ContentType = "Application/msword"; string s = Server.MapPath(WordPath); Response.WriteFile(WordPath); //Response.Write(s); Res... 阅读全文
摘要:
Label1.Text = Play(url, 600, 400); public string Play(string url, int width, int height) { string strTmp = url.ToLower(); if (strTmp.EndsWith(".wmv") || strTmp.EndsWith(".mp4") || strTmp.End... 阅读全文
摘要:
通过Request.QueryString["CheckItem"]的方式调用值的时候,数值中的加号“+”会转换为空格“ ” 例如传输“ABC+EFG”,就会取到“ABC EFG” 解决方法: 使用Server.UrlEncode("数据")方法进行编码,之后QueryString方法会自动解码并返 阅读全文
摘要:
公共Modules定义: Forms中引用: 阅读全文