這時才想起跨庫查詢了。1.開通分散式查詢許可權exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure 2.查詢select a.ProjCode as '樓盤編號',b.projname as '樓盤名稱',count(1) as '房源量' from openrowset( 'SQLOLEDB ',
接著上面的簡單例子添加兩個獲得資料集的方法修改一下IDALCodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->using System;using System.Collections.Generic;using System.Text;namespace IDAL{ public interface AnimalsIDAL {
在C#中使用線程的方法很多,使用委託的BeginInvoke和EndInvoke方法就是其中之一。BeginInvoke方法可以使用線程非同步地執行委託所指向的方法。然後通過EndInvoke方法獲得方法的傳回值(EndInvoke方法的傳回值就是被呼叫者法的傳回值),或是確定方法已經被成功調用。我們可以通過四種方法從EndInvoke方法來獲得傳回值。下面寫了例子 再細說代碼Code highlighting produced by Actipro CodeHighlighter
代碼Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> public string GetFileHash(string filepath) { FileStream filestream = new FileStream(filepath, FileMode.Open, FileAccess.Read, FileShare.
抽象原廠模式提供了一個建立一系列相關或相互依賴對象的介面,運用抽象原廠模式的關鍵點在於應對“多系列對象建立”的需求變化。一句話,學會了抽象原廠模式,你將理解OOP的精華:面向介面編程。看了TerryLee 的例子 自己加了一個先定義兩個抽象類別 Code highlighting produced by Actipro CodeHighlighter