上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 51 下一页
摘要: if (file != null) { string path = Server.MapPath("~/Uploads/"); //获得服务器物理路径 if (!System.IO.Directory.Exists(path))//判断目录是否存在 ... 阅读全文
posted @ 2018-01-25 15:17 enych 阅读(213) 评论(0) 推荐(0) 编辑
摘要: /// /// 增加一条数据 /// public int Add(string 表名,string 参数,string 参数值) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into ")... 阅读全文
posted @ 2018-01-24 14:12 enych 阅读(933) 评论(0) 推荐(0) 编辑
摘要: private string GetGeneralContent(string strUrl) { string strMsg = string.Empty; try { WebRequest request = WebRequest.Create(strUrl); ... 阅读全文
posted @ 2018-01-23 15:42 enych 阅读(204) 评论(0) 推荐(0) 编辑
摘要: //.方法一:采用OleDB读取EXCEL文件: //打开excel 返回指定表中的所有数据 public DataSet ExcelToDS(string Path) { string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" + "Data Source=" + P... 阅读全文
posted @ 2018-01-22 20:20 enych 阅读(300) 评论(0) 推荐(0) 编辑
摘要: //读取EXCEL public static DataSet LoadDataFromExcel(string filePath) //加载excel 返回DataSet内存数据库 { try { string strConn; strConn = "... 阅读全文
posted @ 2018-01-22 17:25 enych 阅读(236) 评论(0) 推荐(0) 编辑
摘要: ALTER TABLE tab1 add id int identity primary key (注意:必须加identity,否则添加会失败) //导入excel时候 先把主键去掉 变为可为空,之后导入数据, 之后在额外添加主键 alter table tab1 drop column aaa; 删除列 阅读全文
posted @ 2018-01-22 14:58 enych 阅读(175) 评论(0) 推荐(0) 编辑
摘要: DataSet ds = new DataSet(); DataTable dt= new DataTable("Customers"); ds.Tables.Add(dt); //添加这个表 读取DataSet中某一个DataTable: dt=ds.Tables[0];//指定第0个表 dt=ds.Tables["Customers"];//指定表名为“Customers”的表 阅读全文
posted @ 2018-01-14 11:46 enych 阅读(137) 评论(0) 推荐(0) 编辑
摘要: select top 10 * from ComprehensiveShow where id not in(select top 40 id from ComprehensiveShow order by id) 意思是查询前40条数据,在查询不在前40条数据中的前10条数据 //select t 阅读全文
posted @ 2018-01-13 16:58 enych 阅读(197) 评论(0) 推荐(0) 编辑
摘要: use test select isnull(max(CCC),0)+1 from [tab] --返回表中指定列名中有多少条数据 select count(0) from (select * from tab) as dhs_table --统计表中的行数 insert into Areas() values () ;select @@IDENTITY --用select @@iden... 阅读全文
posted @ 2018-01-12 16:17 enych 阅读(128) 评论(0) 推荐(0) 编辑
摘要: function gget() { $.ajax({ type: "GET", url: "index", data: { U: '1234', P: '000' }, //async: true, ... 阅读全文
posted @ 2018-01-11 22:07 enych 阅读(263) 评论(0) 推荐(0) 编辑
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 51 下一页