Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connection to linked server

Status
Not open for further replies.

jamert

Programmer
Dec 9, 2007
80
CA
Hi, i crated a stored procedure that connects to a linked server; SQL 2k has a linked server: Access. I can run the query in QueryAnalyser and all is well. When i call the stroedProc from c# i;m getting error:
OLE DB provider 'Microsoft.Jet.OLEDB.4.0' reported an error. Authentication failed.

on this line:
protected IDataReader ExecuteReader(DbCommand cmd, CommandBehavior behavior)
{
--> return cmd.ExecuteReader(behavior);
}

a watch show this:
ExecuteReader
'TReport.App_Code.DAL.DataAccess.ExecuteReader(System.Data.Common.DbCommand)' is a 'method', which is not valid in the given context

Would i have to include something in the webconfig for this lined server connection?

Any thoughts on this?

thanks
 
MS Access can give some very misleading errors? Have you looked in the command object to check that the connection string etc are as you thought they should be?

Age is a consequence of experience
 
thanks litton1,

turns out i need to gain more understanding of linked servers. I went into the access db under security to view the users/groups, there was a user called "Admins" with an 's', so i was trying to connect using this. Turns out that its acutally called "Admin" :(

article:

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top