摘要: /******* 导出到excel EXEC master..xp_cmdshell ’bcp SettleDB.dbo.shanghu out c:"temp1.xls -c -q -S"GNETDATA/GNETDATA" -U"sa" -P""’ /*********** 导入Excel SELECT * FROM OpenDataSource( ’Microsoft.J... 阅读全文
posted @ 2008-03-31 17:11 Afeng28 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 转一文章请参考: 前几天,一直在网上搜索资料,想实现这个功能,都没找到我想要的结果,最后只要自己想办法实现了。 大体思路是:将EXCEL的数据提出放在数据集中,在过循环将主表数据插入,在通过循环将从表插入: 代码如下: ... 阅读全文
posted @ 2008-03-31 12:04 Afeng28 阅读(584) 评论(0) 推荐(0) 编辑
摘要: 1、DateTime 数字型 System.DateTime currentTime=new System.DateTime(); 1.1 取当前年月日时分秒 currentTime=System.DateTime.Now; 1.2 取当前年 int 年=currentTime.Year; 1.3 取当前月 int 月=currentTime.Month; 1.4 取当前日 in... 阅读全文
posted @ 2008-03-31 11:57 Afeng28 阅读(105) 评论(0) 推荐(0) 编辑