捐血一袋救人一命

2016年4月8日 星期五

Excel 連接 MS SQL 資料庫VBA巨集程式

Sub connectSQL()     Dim Conn As ADODB.Connection     Dim sConnect As String     Dim strSqlInstance As String     Dim strSqlDB As String     Dim strSqlUser As String     Dim strSqlPWD As String     ' strSqlInstance = "SERVER_NAME\INSTANCE"     ' 如果伺服器只有裝一次 SQL,就只要輸入伺服器名稱     strSqlInstance...