'Conn = "Provider=SQLOLEDB;" & _
"Persist Security Info=False;" & _
"User ID=" & SA & _
";PWD=" & PW & _
";Initial Catalog=" & Lib & _
";Data Source=" & Addr
结果这样子没连上。其它三台电脑连接SQL没问题。
'Conn = "Provider=SQLNCLI10.1;" & _
"Integrated Security="""";" & _
"Persist Security Info=False;" & _
"User ID=" & SA & ";" & _
"Initial Catalog=" & Lib & ";" & _
"Data Source=" & Addr & ";" & _
"Initial File Name="""";" & _
"Server SPN="""""
这样子连上了。是的,我瞎了。为什么一定要用客户端的形式?
"Persist Security Info=False;" & _
"User ID=" & SA & _
";PWD=" & PW & _
";Initial Catalog=" & Lib & _
";Data Source=" & Addr
结果这样子没连上。其它三台电脑连接SQL没问题。
'Conn = "Provider=SQLNCLI10.1;" & _
"Integrated Security="""";" & _
"Persist Security Info=False;" & _
"User ID=" & SA & ";" & _
"Initial Catalog=" & Lib & ";" & _
"Data Source=" & Addr & ";" & _
"Initial File Name="""";" & _
"Server SPN="""""
这样子连上了。是的,我瞎了。为什么一定要用客户端的形式?