09 2012 档案
摘要:SQL Server 2005表自增字段在多次插入数据后,自增的ID号比较混乱,而且删除数据后,自增的ID并不会归零,有两种方法可以控制自增的字段:方法一: 如果曾经的数据都不需要的话,可以直接清空所有数据,并将自增字段恢复从1开始计数 truncate table 表名方法二: dbcc checkident ('table_name', reseed, new_reseed_value) 当前值设置为 new_reseed_value。如果自创建表后没有将行插入该表,则在执行 DBCC CHECKIDENT 后插入的第一行将使用 new_reseed_value 作为标识。
阅读全文
摘要:数据库中表被哪些东东所操作过的记录:SELECTsm.object_id,OBJECT_NAME(sm.object_id)ASobject_name,o.type,o.type_desc,sm.definitionFROMsys.sql_modulesASsmJOINsys.objectsASoONsm.object_id=o.object_idwheredefinitionlike'%表名%'ORDERBYo.type;GO
阅读全文
摘要:///<summary>///是否中文名字///</summary>///<paramname="name"></param>///<returns></returns>publicstaticboolIsChinese(stringname){if(String.IsNullOrEmpty(name))returnfalse;else{Regexreg=newRegex(@"^[\u4E00-\u9FA5]{1,20}$");returnreg.IsMatch(name);}}//
阅读全文
摘要:<style>body{height:120%; scrollbar-face-color:#C0C0C0; scrollbar-highlight-color:#FFFFFF; scrollbar-3dlight-color:#C0C0C0; scrollbar-darkshadow-color:#000000; scrollbar-Shadow-color:#808080; scrollbar-arrow-color:#000000; scrollbar-track-color:#E0E0E0;}.curved_box{display:inline-block;*disp...
阅读全文
摘要:publicstringRenderToHTML(){Check();StringBuildersb=newStringBuilder();//doubletempCount=(TotalCount+(0.0))/PageSize;//intpageCount=(int)Math.Ceiling(tempCount);intvisibleStart=CurrentPageIndex-MaxPageCount/2;if(visibleStart<1)//6还是没区别{visibleStart=1;}intvisibleEnd=visibleStart+MaxPageCount;if(vis
阅读全文

浙公网安备 33010602011771号