Provider=SQLOLEDB.1;Password=map;
Persist Security Info=True;User ID=map;
Initial Catalog=SuperWorkFlow;Data Source=GTSERVER
參數含義:Provider(驅動)、Data Source(伺服器)、Initial Catalog(資料庫)、User ID/Password(認證)、Persist Security Info(持久安全驗證)。
INI 為 Windows 初始化檔,結構:
[Section1]
Keyword1=Value1
Keyword2=Value2
[Section2]
Keyword1=Value1
[] 括起,[ 必須在第 1 欄=啟動時從指定 INI 讀取參數反映執行環境,結束時寫回當前環境。以此將連接資訊與程式碼解耦,達到可攜性。