close

Dim Db As ADODB.Connection

Set Db = New ADODB.Connection

connstr = "Provider=sqloledb ; Data Source=127.0.0.1,1433;Initial Catalog=dbName;Persist Security Info=True;User ID=123;Password=456"

Db.Open connstr

PS.

Data Source: 連接Sql Sever IP + Port [以逗號分開] [IP 127.0.0.1 代表本機]

Catalog:資料庫名稱

User ID:登入帳號

Password:密碼

arrow
arrow
    全站熱搜

    level168 發表在 痞客邦 留言(0) 人氣()