C# mount / unmount UNC (network folder / drive) 連結網路磁碟機
有些時候為了 security 問題或者想要詳細紀錄使用者存取網路磁碟機或目錄中資料的情況, 所以會另外建立帳號並透過程式來存取網路磁碟機, 而不讓使用者直接用他的帳號密碼來存取, 這時候就需要讓程式可以建立網路磁碟機與中斷連線. 我自己比較喜歡第一個方式, 相對來說簡單許多.
有些時候為了 security 問題或者想要詳細紀錄使用者存取網路磁碟機或目錄中資料的情況, 所以會另外建立帳號並透過程式來存取網路磁碟機, 而不讓使用者直接用他的帳號密碼來存取, 這時候就需要讓程式可以建立網路磁碟機與中斷連線. 我自己比較喜歡第一個方式, 相對來說簡單許多.
程式執行後以最小化的方式執行,即不會出現在工作列上,而會出現在tray裡頭。而在 tray icon 上可以點滑鼠右鍵來彈出功能表單(menu),進行各功能選擇(如結束等)。
有時候為了要偷偷做一些事情, 所以會想要讓程式以無視窗在背景執行, 而要做出這樣的程式其實方法很簡單 在建立專案的時候選擇「主控台應用程式」(console application) 設定專案屬性(properties), 將輸出類型改為「windows 應用程式」 這樣就可以了, 當發現到這樣做就搞定的時候還有點訝異怎麼這麼容易…
Just wake up from noon break, I think I have to write down some day-to-day things.
處理 XML 文件資料時,利用 XPath 來選取文件中節點是蠻常見的方式,可是當這個節點是具有 namespace 時,該怎麼辦呢?
Early this morning, a fiber optic cable from Santa Cruz to San Francisco area is severed.
The difference experience while dining with the advisor. (not discussing the foods :P)
Remeber to check the item “Integration Services” (SSIS) in the install process, or you will fail and get a error message like “product level is insufficient for components” while importing data from txt, excel, etc. files into a SQL server 2005 database. Related: porduct level is insufficient for components
就令人火氣大血壓高…
BCP為M$ SQL Server的一個公用程式(utility),主要的功能為將大量儲存在檔案中的資料拷貝進入資料庫表格中,或者將資料庫表格中的資料匯出到檔案中,而這些動作都可以透過command line來完成,所以也可以很方便地透過batch file的編寫來當成scheduled job來使用。