摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Security.Cryptography;using System.IO;namespace MTR.Lib... 阅读全文
posted @ 2014-08-20 15:53 xachary 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 加密:@echo offecho web.configc:cd c:\windows\Microsoft.NET\Framework64\v4.0.30319aspnet_regiis -pe "appSettings" -app "/XXX"aspnet_regiis -pe "connectio... 阅读全文
posted @ 2014-08-18 15:35 xachary 阅读(615) 评论(0) 推荐(0) 编辑
摘要: 定义: 使用: 原理: Int32 是 4字节32位二进制None = 0, 即 0000 0000 0000 0000 0000 0000 0000 0000 ResetFixedBar = 1 << 1, 即 0000 0000 0000 0000 0000 0000 0000 0001 -> 阅读全文
posted @ 2014-08-07 17:43 xachary 阅读(718) 评论(0) 推荐(0) 编辑
摘要: SQL ServerSELECT nameFROM sys.sysobjects SOWHERE EXISTS( SELECT * FROM syscolumns SC WHERE name LIKE 'Reason' AND SC.id = SO.id)MySQ... 阅读全文
posted @ 2014-07-21 14:32 xachary 阅读(171) 评论(0) 推荐(0) 编辑
摘要: var numberChars = "0123456789";/* Convert to decimal string */function toDecimalString(value, place, hasDollarSign) { var n = 2; var ds = true; ... 阅读全文
posted @ 2014-06-10 10:19 xachary 阅读(6641) 评论(0) 推荐(0) 编辑
摘要: --不同SQL Server数据库之间的跨数据库查询EXEC sp_addlinkedserver@server=N'OldDatabase', --自己定义别名@srvproduct=N'',@provider=N'SQLNCLI',@datasrc=N'10.199.123.123\SQL200... 阅读全文
posted @ 2014-06-04 11:38 xachary 阅读(494) 评论(0) 推荐(0) 编辑
摘要: 添加重要的命名空间:using System.Runtime.InteropServices;先建立结构相同(char长度相同)的Struct类型用于转换:[StructLayout(LayoutKind.Sequential, Pack = 1)] public struct Employe... 阅读全文
posted @ 2014-05-22 10:09 xachary 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 想使用using(...), 如:using (Getter process = new Getter()){ //...}就必须给类实现接口IDisposablepublic sealed class Getter: IDisposable { #region ... 阅读全文
posted @ 2014-05-21 15:47 xachary 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 首先在SQLServer定义一个自定义表类型:USE [ABC]GOCREATE TYPE [ABC].[MyCustomType] AS TABLE( [EmployeeId] [char](6) NOT NULL, [LastName] [varchar](30) NULL, ... 阅读全文
posted @ 2014-05-21 09:42 xachary 阅读(5525) 评论(0) 推荐(1) 编辑
摘要: static void Main(string[] args) { //定义与目标表结构相同的DataTable DataTable dataTable = new DataTable(); dataTable.Colu... 阅读全文
posted @ 2014-05-21 09:31 xachary 阅读(208) 评论(0) 推荐(0) 编辑