We help IT Professionals succeed at work.
Get Started

SQLNCLI for linked server returned message "Invalid authorization specification"

1,910 Views
Last Modified: 2012-05-08
Thank you for looking at my question,

Scenario: The organisation for which I work has recently split into two discrete companies (Company A and Company B). I built a number of VB applications that interrogate / manipulate a SQL Server (Enterprise Manager) database running on SBS 2003.

The two companies have some common functions so I copied the Company A database to Company B's new SQL Server 2005 instance which is running on a new SBS 2003 server.

Have set up the relevant Company B users and ensured that they can see the Company B database via ODBC connection.

I ran one of the vb applications (compiled on my pc in Company A) on a pc in Company B and at the first point it should communicate with a database the thing crashed with the following error

Run Time Error '-21472179100 (80040e14)':
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB provider "SQLNCLI" for linked server "COMPANY_A_SERVER" returned message "Invalid authorization specification"

My code doesn't make any reference to the Company A server, so where does the .exe file pick that reference up?

I have attached the connection string I use in the code.

How can I make the executable run on Company B system?

Thank you


Set connSupplier = New Connection
    connSupplier.CursorLocation = adUseClient
    connSupplier.Open "PROVIDER=MSDASQL;dsn=ODBCName;uid=UserName;pwd=password;database=databasename;"

Open in new window

Comment
Watch Question
Application Development Manager
CERTIFIED EXPERT
Commented:
This problem has been solved!
Unlock 2 Answers and 9 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE