posts - 44,  comments - 127,  trackbacks - 12
C#
SQL SERVRE 2005 CLR TVF错误:从用户定义的表值函数获取新行时出错:Data access is not allowed in this context.
摘要: 消息 6260,级别 16,状态 1,第 1 行 从用户定义的表值函数获取新行时出错: System.InvalidOperationException: Data access is not allowed in this context. Either the context is a function or method not marked with DataAccessKind.Read or SystemDataAccessKind.Read, is a callback to obtain data from FillRow method of a Table Valued Function, or is a UDT validation method. System.InvalidOperationException: at System.Data.SqlServer.Internal.ClrLevelContext.CheckSqlAccessReturnCode(SqlAccessApiReturnCode eRc) at System.阅读全文
posted @ 2009-06-14 15:05 空空儿 阅读(229) | 评论 (0) 编辑
在C#里使用属性
posted @ 2008-06-28 17:09 空空儿 阅读(636) | 评论 (0) 编辑
对对象类型和调用方法属性进行存储以提升反射性能
摘要: 通过对对象类型和调用方法属性进行存储以改善反射的性能.阅读全文
posted @ 2008-04-25 13:55 空空儿 阅读(667) | 评论 (0) 编辑
生成大量随机字符串不同实现方式的效率对比
摘要: 在26位英文字母中随即选取10个字符组成字符串,产生一定数量的唯一字符串,对比几种方式:
1.使用 System.Security.Cryptography.RNGCryptoServiceProvider 生成 Random 的种子 和 使用普通声称随机数进行对比.
2.使用 IDictionary 其中TKey是 Int 型 存放字符串的HashCode,TValue 是 String 型,存放生成的字符串,通过对比键判断是否项是否已经存在 和 使用 IList 存储字符串进行对比.
3.使用随机截取字符串 和 随机字符串数组索引获取组成字符串.阅读全文
posted @ 2008-03-08 00:31 空空儿 阅读(5004) | 评论 (10) 编辑
上传文件到FTP
摘要: 利用 FtpWebRequest 类实现上传文件到FTP.阅读全文
posted @ 2007-09-08 00:44 空空儿 阅读(2015) | 评论 (4) 编辑
使用HtmlParser解析HTML
摘要: 使用HtmlParser解析HTML阅读全文
posted @ 2007-06-29 16:30 空空儿 阅读(14820) | 评论 (3) 编辑
得到 yyyy/mm/dd 格式时间
摘要: 将 yyyy-mm-dd 格式转换为 yyyy/mm/dd 格式阅读全文
posted @ 2006-12-30 10:06 空空儿 阅读(451) | 评论 (0) 编辑