摘要: 什么是索引拿汉语字典的目录页(索引)打比方:正如汉语字典中的汉字按页存放一样,SQL Server中的数据记录也是按页存放的,每页容量一般为4K 。为了加快查找的速度,汉语字(词)典一般都有按拼音、笔画、偏旁部首等排序的目录(索引),我们可以选择按拼音或笔画查找方式,快速查找到需要的字(词)。同理,SQL Server允许用户在表中创建索引,指定按某列预先排序,从而大大提高查询速度。• SQL Server中的数据也是按页( 4KB )存放• 索引:是SQL Server编排数据的内部方法。它为SQL Server提供一种方法来编排查询数据 。• 索引页:数据库中存储索引的数据页;索引页类似于 阅读全文
posted @ 2014-03-21 21:48 lampon 阅读(203) 评论(0) 推荐(0) 编辑
摘要: Transact-SQL中的存储过程,非常类似于Java语言中的方法,它可以重复调用。当存储过程执行一次后,可以将语句缓存中,这样下次执行的时候直接使用缓存中的语句。这样就可以提高存储过程的性能。Ø 存储过程的概念 存储过程Procedure是一组为了完成特定功能的SQL语句集合,经编译后存储在数据库中,用户通过指定存储过程的名称并给出参数来执行。 存储过程中可以包含逻辑控制语句和数据操纵语句,它可以接受参数、输出参数、返回单个或多个结果集以及返回值。 由于存储过程在创建时即在数据库服务器上进行了编译并存储在数据库中,所以存储过程运行要比单个的SQL语句块要快。同时由于在调用时只需用 阅读全文
posted @ 2014-03-21 21:32 lampon 阅读(225) 评论(0) 推荐(0) 编辑
摘要: C#中执行SQL语句//SQL查询语句 public DataTable query(string sql) { //server=127.0.0.1; DataTable dt=new DataTable(); //DataRow dr; string connString = "server=127.0.0.1;uid=sa;pwd=;database=TJPTTC"; SqlConnection conn = new SqlConnection(connString); SqlDataAdapter adapter = new SqlDataAdapter(s... 阅读全文
posted @ 2014-03-18 14:58 lampon 阅读(6935) 评论(0) 推荐(0) 编辑
摘要: WebClient private string GetWebClient(string url) { string strHTML = ""; WebClient myWebClient = new WebClient(); Stream myStream = myWebClient.OpenRead(url); StreamReader sr = new StreamReader(myStream, System.Text.Encoding.GetEncoding(this.txtEncoder.Text)); strHTML = sr.ReadToEnd(); ... 阅读全文
posted @ 2014-02-13 11:34 lampon 阅读(326) 评论(0) 推荐(0) 编辑
摘要: public string Tohtml(string zifu) { string noStyle = zifu.Replace(""", "\"").Replace("<", "").Replace(""", "\"").Replace("", ""); noStyle = Regex.Replace(noStyle, @"", "& 阅读全文
posted @ 2014-02-08 16:46 lampon 阅读(2414) 评论(0) 推荐(0) 编辑
摘要: DataSet添加新列DataSet ds = jhPhotoAlbum.GetList("JH5='" + key + "'");ds.Tables[0].Columns.Add("count", typeof(System.String));for (int i = 0; i 10) { DataTable dt = new DataTable(); dt = ds.Tables[0].Clone(); for (int i = 0; i < 10; i++) ... 阅读全文
posted @ 2013-12-11 14:41 lampon 阅读(1151) 评论(0) 推荐(0) 编辑
摘要: [HTML]代码Set zzz to Chose SelectSet a,c,e,h to Chose Mult-Select[Javascript]代码 阅读全文
posted @ 2013-11-14 22:05 lampon 阅读(1464) 评论(0) 推荐(0) 编辑
摘要: #region 保存web图片到本地 /// /// 保存web图片到本地 /// /// web图片路径 /// 保存路径 /// 保存文件名 /// public static string SaveImageFromWeb(string imgUrl, string path, string fileName) { if (path.Equals("")) throw new Exception("未指定保存文件的路径"); string imgName = imgUrl.ToS... 阅读全文
posted @ 2013-11-12 14:59 lampon 阅读(9192) 评论(1) 推荐(0) 编辑
摘要: 如果file框没有加runat="server",则form里一定要加上 enctype="multipart/form-data"这样才可以实现上传文件到服务器;使用了server和没有使用 runat="server"是有区别的.使用了runat="server"的form编译后,action必定是指向本身的网页。而没 有加runat="server"的form可以指向一个网页。 服务端代码: private string retvalue = "ok"; protect 阅读全文
posted @ 2013-11-12 14:54 lampon 阅读(928) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.IO;using System.Drawing;using System.Drawing.Drawing2D;using System.Drawing.Imaging;namespace WuJian.Common{ /// /// 图片处理 /// http://www.cnblogs.com/wu-jian/ /// /// 吴剑 2011-02-20 创建 /// 吴剑 2012-08-08 修改... 阅读全文
posted @ 2013-11-12 14:49 lampon 阅读(259) 评论(0) 推荐(0) 编辑