09 2012 档案
摘要:Process[] processCurrent = Process.GetProcesses();//得到系统中存在的进程 for (int i = 0; i < processCurrent.Length; i++) { if ((processCurrent[i].ProcessName.Contains("XXX"))|| (processCurrent[i].ProcessNam...
阅读全文
摘要:sql高级编程知识 2008-05-09 14:22:24| 分类: 默认分类 | 标签: |字号大中小 订阅 .1.局部变量声明和赋值应用例子1:declare @name varchar(8)set @name ='鑫联华'--或者select @name='鑫联华'print @name --打印变量select * from office where officeName=@name例子2:declare @name varchar(8)set @name = (select top 1 officeName from office)select * f
阅读全文
摘要:这个问题出现的关键原因在于用了USING,如下:using 在使用完后,会自动关闭conn连接,这才是真正的原因,之前我还以为是用了多层架构弓起的,结果试了好多次始终没能解决,差点就用了DATASET了,了解了这一点,问题迎刃而解,把上面的USING 改一下, ////using (SqlConnection conn = new SqlConnection(GetConStr(s, d))) {///直接用下句去掉USINGSqlConnection conn = new SqlConnection(GetConStr(s, d)) ...
阅读全文