03 2010 档案
摘要:comboBox和textBox支持内置的搜索提示功能, 在form的InitializeComponent()中添加如下语句: this.comboBox1.AutoCompleteCustomSource.AddRange(new string[] { "10.152.154.89", "10.152.154.90", "10.152.252.10", "10.152.252.11" });//是将数据添加到搜索范围//默认是None,还有Append,和SuggestAppend属性,除了默认的None都可以
阅读全文
posted @ 2010-03-17 15:31
峡谷少爷
摘要:SqlBulkCopy是.net2.0的新特性,平时用的很少,但是其功能却是非常强大,对于批量插入数据性能非常优越代码经过1000条数据的对比测试,一般性的循环插入与sqlbulk插入的时间对比为:一般插入:使用时间0.5200008秒使用builk插入:使用时间0.02秒性能非常优越
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->///<summary>///反序列化///</summary>///<paramname="type">对象类型</param>///<paramname="filename">文件路径</param>///<returns></returns>publi
阅读全文
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->functionflashWrite(url,w,h,id,bg,vars,win){varflashStr="<divalign=\"center\"><objectclassid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'codebase='http://fpdownl
阅读全文
摘要:主程序代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--functiongetXmlhttp(){varhttp_request;if(window.XMLHttpRequest){http_request=newXMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType("text/xml");}}elseif(window.ActiveXOb
阅读全文
摘要:@echo offsetlocal@echo %WINDIR%\System32\msdtc.exe -uninstall%WINDIR%\System32\msdtc.exe -uninstallcall :delkey "HKCR\CID"call :delkey "HKLM\SYSTEM\CurrentControlSet\Services\MSDTC"call :delkey "HKLM\SYSTEM\ControlSet001\Services\MSDTC"call :delkey "HKLM\SYSTEM\ControlSet002\Services\MSDTC"call :del
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--///在使用本例之前要先手动引用system.configration组件,然后建立config文件,config文件名为当前程序文件名的后面加.config比如:a.exe.configusingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Configuration;usingSystem.Data;us
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--pre用JS让文章内容指定的关键字加亮是这样的..现在有这些关键字:美容,生活,购物当在文章里头出现这些关键字,就把它加亮显示..文章是生成静态页面的,而这些关键字是能随时更新的,所以我想用JS来实现...不知道怎样来实现这样的功能啊?特此求助/prescriptlanguage="JavaScript"functionhighlight(key){varkey=key.split('
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--ahref="#"onclick="window.frames['frame1'].MyNext()"aa/aiframeid="frame1"src="print.html"/iframeprint.html页面scriptlanguage="javascript"type="text/javascript"functionMyNext(){alert(1);}/scrip
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/----全部的简繁对照declare@jallnvarchar(4000),@fallnvarchar(4000)select@jall=N'啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--ifexists(select*fromdbo.sysobjectswhereid=object_id(N'[dbo].[f_search]')andxtypein(N'FN',N'IF',N'TF'))dropfunction[dbo].[f_search]GOifexists(select*fromdbo.sysobjectswhereid=object_id(N'[序数表]')andOBJE
阅读全文
摘要:查询第X页,每页Y条记录最基本的处理方法(原理):如果表中有主键(记录不重复的字段也可以),可以用类似下面的方法,当然y,(x-1)*y要换成具体的数字,不能用变量:select top y * from 表 where 主键 not in(select top (x-1)*y 主键 from 表)如果表中无主键,可以用临时表,加标识字段解决.这里的x,y可以用变量.select id=ident...
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--CREATEPROCsp_PageView@sqlntext,--要执行的sql语句@PageCurrentint=1,--要显示的页码@PageSizeint=10,--每页的大小@PageCountintOUTPUT--总页数ASSETNOCOUNTONDECLARE@p1int--初始化分页游标EXECsp_cursoropen@cursor=@p1OUTPUT,@stmt=@sql,@sc
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/----创建测试的数据库CREATEDATABASEdbGOUSEdb--创建测试的表CREATETABLEtb(idintIDENTITY,colntext,CONSTRAINTPK_tbPRIMARYKEY(id))INSERTtbSELECTN'若无其事咬牙切齿'UNIONALLSELECTN'车水马龙abcd因小而失大'GO--初始化全文索引EXECsp_fulltext_database'e
阅读全文
摘要:日志备份和差异备份还原中的常见问题示例代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 --创建测试 2 CREATE DATABASE db 3 GO 4 5 --正常备份 6 BACKUP DATABASE db TO DISK='c:\...
阅读全文
摘要:C#代码foreach( Control childControl in this.Controls ) { if( childControl is TextBox ){ ((TextBox)childControl).Text = ""; } }Js代码function ClearAllTextBox() { var obj=window.document.forms[0]; for(i=0;i...
阅读全文
摘要:[DllImport("wininet.dll")]privateexternstaticboolInternetGetConnectedState(outintconnectionDescription,intreservedValue);privateboolIsConnected(){intI=0;boolstate=InternetGetConnectedState(outI,0);ret...
阅读全文
摘要:1,有如下表格,我们要取第2行第2列的值<table id="table1"> <tr> <td>1行1列</td> <td>1行2列</td> </tr> <tr> <td>2行1列</td> <td>2行2列</td> </tr></...
阅读全文
摘要:javascript:连接数据库<scriptlanguage="javascript">//用JavaScript写服务器端连接数据库的代码示例varconn=newActiveXObject("ADODB.Connection");conn.Open("Provider=SQLOLEDB.1;DataSource=localhost;UserID=sa;"+"Password=;InitialCatalog=pubs");varrs=newActiveXObject("ADODB.Reco
阅读全文
摘要:1. 面向对象的思想主要包括:继承 多态 封装● 封装:用抽象的数据类型将数据和基于数据的操作封装在一起,数据被保护在抽象数据类型内部。● 继承:子类拥有父类的所有数据和操作。● 多态:一个程序中同名的不同方法共存的情况。 有两种形式的多态– 重载与重写。2. 什么是装箱和拆箱装箱(boxing)和拆箱(unboxing)机制使得在C#类型系统中,任何值类型、引用类型和object(对象)类型之间进行转换,这种转换称为绑定连接。简单地说,有了装箱和拆箱的概念,对任何类型的值来说最终都可看作是object类型。 1、装箱转换含义:将一个值类型隐式地转换成一个object类型,或把这个值类型转换成
阅读全文

浙公网安备 33010602011771号