I have an agent to access SQL Server. The code is below
Dim lc As New LcConnection ( “oledb” )
lc.provider = “SQLOLEDB”
lc.server = “serverip”
lc.database = “dbname”
lc.userid = “usd”
lc.password = “pwd”
lc.Connect
If I run it locally on my pc. It manage to connect to the SQL server. But when I schedule it on server, I get the message below
ErrorRecord: HResult: 0x80004005
Description: [DBNMPNTW]Access denied.
SQLErrorInfo: 08001
Source: Microsoft OLE DB
Appreciate any help