摘要: 转自:http://www.cnblogs.com/lichang1987/archive/2009/03/04/1403166.html最近在公司里做项目,遇到一个问题,建的数据库里的中文字符和音标显示为乱码,组里的人所有字符都用varchar表示,所以出现上诉问题,当改为Nvarchar后,问题得到解决。所以有必要把他们的区别再重新复习一遍。 char类型:对英文(ASCII)字符占用1个字节,对一个汉字占用2个字节,CHAR存储定长数据很方便,CHAR字段上的索引效率级高,比如定义char(10),那么不论你存储的数据是否达到了10个字节,都要占去10个字节的空间。因为是固定长度,所以速 阅读全文
posted @ 2013-03-19 16:11 Cathy Lee 阅读(178) 评论(0) 推荐(0) 编辑
摘要: View Code 1 public static string[] casttoarray(string strLine) 2 { 3 List<string> parsedData = new List<string>(); 4 bool tokenInQuotes = false; 5 bool tokenContinued = true; 6 string temp_println = ""; 7 string printLine =... 阅读全文
posted @ 2013-03-19 15:24 Cathy Lee 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Although the .net framework contains all kinds of exception types which are sufficient in most cases, it can make sense to define custom exception in our own application. They can greatly simplify and imprve the error handling.Custom exception derive from Exception calss.Define custom exception cals 阅读全文
posted @ 2013-03-19 15:13 Cathy Lee 阅读(354) 评论(0) 推荐(0) 编辑
摘要: An error is a mistake is coding on the part of the programmer, so the program won't give the desired result.For exampile, in ASP.NET there are different types of error:1. Configuration error: these error arise when the web.config or machine.config files are not formed properly.2. Compilation err 阅读全文
posted @ 2013-03-19 11:56 Cathy Lee 阅读(190) 评论(0) 推荐(0) 编辑