strServer = "sv"
strInstance = "MSDE2000"
strTarget = strServer & "\" & strInstance
strDB = "lightbox"
strUser = "sa"
strPass = "password"
ConnectionString = _
"Provider=SQLOLEDB;" & _
"Data Source=" & strTarget & ";" & _
"Initial Catalog=" & strDB & ";" & _
"User ID=" & strUser & ";" & _
"Password=" & strPass & ";"
on error resume next
Cn.Open ConnectionString
if Err.Number <> 0 then
WScript.Echo Err.Description
Wscript.Quit
end if
on error goto 0
' 処理
Cn.Close
|