11 2014 档案
摘要:防止多个线程同时访问同意对象//1.创建一个锁对象,锁对象必须是一个引用类型static readonly object objSync=new object();Thread t1=new Thread(new ThreadStart(()=>{ lock(objSync) { 代码块 ... 阅读全文
posted @ 2014-11-19 16:56 Struggling Rookie 阅读(106) 评论(0) 推荐(0)
多线程
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2014-11-19 10:47 Struggling Rookie 阅读(86) 评论(0) 推荐(0)
文件流复习
摘要:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2014-11-19 10:26 Struggling Rookie 阅读(108) 评论(0) 推荐(0)
委托复习
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _02_委托复习 { class Program { static void Main(string[] args... 阅读全文
posted @ 2014-11-19 10:25 Struggling Rookie 阅读(107) 评论(0) 推荐(0)
CodeSmith 模版
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace { public class { private _; p... 阅读全文
posted @ 2014-11-15 15:16 Struggling Rookie 阅读(91) 评论(0) 推荐(0)
SQL Server数据库远程操作
摘要:SQL Server数据库远程操作中,在使用openrowset/opendatasource前首先要启用Ad Hoc Distributed Queries服务,因为这个服务不安全所以SqlServer默认是关闭的。1、启用Ad Hoc Distributed Queries的方法SQL Serv... 阅读全文
posted @ 2014-11-14 12:26 Struggling Rookie 阅读(140) 评论(0) 推荐(0)
查询系统数据库
摘要:1.查询当前所有表select * from INFORMATION_SCHEMA.TABLES 阅读全文
posted @ 2014-11-14 12:25 Struggling Rookie 阅读(216) 评论(0) 推荐(0)
Excel
摘要:1.写入2.读取Using(FileStream fs=File.OpenRead("文件")){ //1 创建一个workBooke对象fs 创建一个Workbook对象,会自动把指定的Excel加载到workbook中 using(Workbook wk=new HSSFWorkbook(f... 阅读全文
posted @ 2014-11-12 14:52 Struggling Rookie 阅读(143) 评论(0) 推荐(0)
SQL查询多行合并成一行
摘要:问题描述:无论是在sql 2000,还是在 sql 2005 中,都没有提供字符串的聚合函数,所以,当我们在处理下列要求时,会比较麻烦:有表tb, 如下:idvalue----- ------1 aa1 bb2 aaa2 bbb2 ccc需要得到结果:id values------ --------... 阅读全文
posted @ 2014-11-07 16:16 Struggling Rookie 阅读(480) 评论(0) 推荐(0)
游标
摘要:declare @Result nvarchar(Max) declare @AuthorityZone nvarchar(Max)='' declare @Apply_Type nvarchar(50)='' declare @ProductCode nvarchar(50)='' se... 阅读全文
posted @ 2014-11-07 16:15 Struggling Rookie 阅读(128) 评论(0) 推荐(0)
sql生成20位数随机数
摘要:declare @rnd nvarchar(50)set @rnd =''while LEN(@rnd)<20 begin set @rnd =@rnd + REPLACE ( CONVERT(nvarchar, RAND ()),'0.','') while LEFT(@rnd,1)='0' se... 阅读全文
posted @ 2014-11-07 10:27 Struggling Rookie 阅读(598) 评论(0) 推荐(0)
select Into用法
摘要:1. insert into 表(列1,列2) select 列1,列2 from 表2 where....2.select * into 表2 from 表 1where...上面写法标识将表1的数据插入表2中,在运行完毕这条语句后,表2 在执行该SQL 语句钱表2 已经存在了 则报错。即:该跳语... 阅读全文
posted @ 2014-11-07 10:26 Struggling Rookie 阅读(3774) 评论(0) 推荐(0)
快照
摘要:Create dataBase UserInfo2_Shapon( Name=MySql,fileName='D:\UserInfo2.mdf')as SnapShot of MySqlselect * from UserInfoCreate Proc p_UserInfo( @ShapName n... 阅读全文
posted @ 2014-11-04 23:57 Struggling Rookie 阅读(166) 评论(0) 推荐(0)