摘要:
SQL 关键字:1,CAST:SELECT CAST(productID as varchar(30)+':'+productName) as Name from Prouduct --把 int 转为 varchar 类型去处理. (相当于string.Formate()方法. )2, CASE:SELECT studentName,case Score when Score<60 th... 阅读全文
摘要:
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[UserInfo]') AND type in (N'U'))BEGINCREATE TABLE [dbo].[UserInfo]([UserID] [bigint] IDENTITY(999999999999999999,10000000) ... 阅读全文
摘要:
select*from[AAA]..TableAa innerjoin[BBB]..TableBbona.AcountID=b.ClientID/*方式一:*/select * from [JinRiChinaHotel].dbo.tblVisitor/* 方式二:*/select * from [JinRiChinaHotel]..tblVisitor注意:1,最好数据库用"[]".2, 表名前... 阅读全文
摘要:
软件开发工具集notepad2-v4.0.22H.rariis5.1完整安装包适用XP.rar福昕阅读器FoxitReaderPro3.0Build1817中文绿色版WebDesign :取色软件. 阅读全文
摘要:
create function GetUserNames(@userDptID int)returns nvarchar(500)asbegindeclare @UserID intdeclare @UserNames nvarchar(300)select @UserID = min( UserID ) from UserInfo where UserDpt=@userDptIDset @Use... 阅读全文
摘要:
/// <summary> /// SQL过滤敏感字符 /// </summary> /// <param name="InText">要特殊过滤的字符串</param> /// <returns>过滤后的字符串</returns> public static string SqlFilterSpecial(stri... 阅读全文
摘要:
string xlsPath = this.FileUpload1.PostedFile.FileName;string xlsPath = Server.MapPath("~/Excel/客户需求表.xls");两者区别:前者是物理路径,后者是服务器路径. FileUpload ful = new FileUpload(); ful.FileName; //文件件 ful.PostedFile.... 阅读全文
摘要:
在ASP.NET编程中经常需要用Request获取url的有关信息,Request中有多种方法获取url信息,但我经常忘了各种方法的具体作用,今天我就写了个测试程序,将各种方法得到的结果列出来,以后用时直接参考一下就行了。 测试的url地址是http://www.test.com/testweb/default.aspx, 结果如下: Request.ApplicationPath: /testw... 阅读全文
摘要:
DateTime baseTime = DateTime.Parse("1900-01-01"); rpf.BriefDate = baseTime.AddDays(1000); example: DateTime baseTime = DateTime.Parse("1900-01-01"); Response.Write(baseTime.AddDays(39868-2).ToString("... 阅读全文
摘要:
声明为:static 的量变 会一直保存在内存中,应尽量少用如果页面中(Web 页面)千万别用静态变量. 因为,静态变量保存在服务器的内存中,只有当服务器关闭时,才会消失. 而页面的生命周期.... 阅读全文