K Manley 12.Mar.07 11:53 AM a Web browser LEIAll ReleasesWindows NT
When attempting to connect to SQL Server using LC LSX and calling an agent with RunOnServer Method and using SQL server authentication the following error is returned:
ErrorRecord: HResult: 0x80004005
Description: [DBNMPNTW]Specified SQL server not found.
SQLErrorInfo: 08001
Source:
03/12/2007 09:48:21 AM Agent printing: 12325
No error is returned when running agent from client.
Solution:
Add .Network="DBMSSOCN" to your connection object.
With con
.provider = "sqloledb"
.server = "serverName"
.Database = "dbName"
.Metadata = "tableName"
.Userid = "User"
.Password = "PW"
.MapByName = True
.Network="DBMSSOCN"
End With
Hope this helps someone else, it took forever to figure out.