上一页 1 2 3 4 5 6 7 ··· 13 下一页

2010年2月3日

.Net 保护中的 native compile 方式

摘要: 据宣传,这个功能就是将dotNet程序编译成native的本地代码,有代表性的相关工具有xenocode, themida 和 remotesoft。他们实际上属于两类:一、伪编译就是把磁盘上的 dotNet程序转换成 win32 的程序,但运行后在内存中实际上还是dotNet程序,只是使用了一个win32 loader,把dotNet程序整体打包嵌入到了这个 win32 的loader中。二、n... 阅读全文

posted @ 2010-02-03 11:01 highmayor 阅读(400) 评论(0) 推荐(0) 编辑

2010年1月5日

C#正确实现IDisposable接口

摘要: .NET中用于释放对象资源的接口是IDisposable,但是这个接口的实现还是比较有讲究的,此外还有Finalize和Close两个函数。public class Foo: IDisposable{ public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(... 阅读全文

posted @ 2010-01-05 10:54 highmayor 阅读(477) 评论(0) 推荐(0) 编辑

什么类要继承于IDisposable呢

摘要: public class SQLBase : IDisposable { private SqlConnection conn; private SqlTransaction trans = null; #region 释放资源 /// <summary> /// 释放资源 /// </summary> public void Dispose() { Dispose(tru... 阅读全文

posted @ 2010-01-05 10:53 highmayor 阅读(266) 评论(0) 推荐(0) 编辑

2009年12月16日

Oracle数据增量备份/导出

摘要: Oracle数据增量备份/导出下面介绍利用Export/Import实用程序对ORACLE数据库进行备份、恢复的方法:增量卸出/装入。增量卸出是一种常用的数据备份方法,包括3个子类:(1)“完全”增量卸出就是对整个ORACLE数据库进行完全卸出。如:$ exp system/口令 inctype=complete full=y file=today.dmp(2)“... 阅读全文

posted @ 2009-12-16 15:46 highmayor 阅读(826) 评论(0) 推荐(0) 编辑

2009年11月30日

ADO.NET四种并发

摘要: 1.后来居上在更新和删除的where条件中只包括主键,例:用户A读取一行用户B读取同一行用户B修改这一行并成功提交更改用户A修改这一行并成功提交更改,覆盖了用户B刚提交的更改2.全字段比较在更新和删除的where条件包括所有字段,可防止后来居上,BLOB类型的字段不能比较3.在更新和删除的where条件包括主键和时间戳列(表上面要加时间戳列),同2,可简化where条件4.使用主键和要更新的列,不... 阅读全文

posted @ 2009-11-30 15:27 highmayor 阅读(240) 评论(0) 推荐(0) 编辑

SqlCommand,OracleCommand,OleDbCommand 或 OdbcCommand比较

摘要: 4种连接方式异同比较SqlCommand.Parameters中的参数变量要在前面加“@”如:myCommand.CommandText = "SELECT CustomerID, CompanyName FROM Customers WHERE Country = @Country AND City = @City";OracleCommand.Parameters中的參... 阅读全文

posted @ 2009-11-30 10:44 highmayor 阅读(571) 评论(0) 推荐(0) 编辑

使用TableMappings把英文字段名变成中文字段名

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlCli... 阅读全文

posted @ 2009-11-30 10:13 highmayor 阅读(368) 评论(0) 推荐(0) 编辑

2009年11月28日

oracle删除某个用户所有表

摘要: 1、select 'Drop table '||table_name||';' from all_tables where owner='要删除的用户名(注意要大写)'; 2、删除所有表以用户test为例for example:declare cursor cur1 is select table_name from dba_tables where owner='TEST';begin fo... 阅读全文

posted @ 2009-11-28 14:03 highmayor 阅读(964) 评论(0) 推荐(0) 编辑

C#中,String和string的区别

摘要: C#中,字符串的声明,你使用String还是string?String? string? 只有一个大小写的问题,你习惯用哪个?知道具体的区别吗?我是习惯了用string,区别也是最近才找到了权威的根据,'CLR via C#'。其实,String是CLR的类型名称(也算是keyword),而string是C#中的keyword。在C#的编译时,默认会增加几行代码,看了你就会明白string和Str... 阅读全文

posted @ 2009-11-28 13:00 highmayor 阅读(309) 评论(1) 推荐(0) 编辑

2009年11月26日

ADO.NET Entity Framework

摘要: 微软推出ADO.NET Entity Framework,即下一代的ADO.NET。它是比Linq To SQL更加强大的ORM,让开发人员只需要着眼于领域对象模型的开发,而不需要考虑它们是如何与关系数据库交互。 阅读全文

posted @ 2009-11-26 15:18 highmayor 阅读(220) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 13 下一页

导航