Click here to Skip to main content
15,913,107 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i try to get the data from an access table to Sql by using SQL Procedures
and this is the code i used it
EXEC sp_addlinkedserver
@server = 'ADBS',
@provider = 'Microsoft.Jet.OLEDB.4.0',
@srvproduct = 'OLE DB Provider for Jet',
@datasrc = 'C:\good\Manager.mdb'


and
create view  m3 as
Select * FROM OPENQUERY(ADBS, 'SELECT * FROM DPICrosses')



but this error is coming
OLE DB provider "Microsoft.Jet.OLEDB.4.0' for linked server' ADBS' returned message "Could not find file 'C:\good\Manager.mdf'
Msg 7303, Level 16, State 1, Procedure m3, Line 2
can any one help me in solving that..?
thanks
Posted
Updated 11-Feb-11 16:44pm
v2

1 solution

Error clearly states that the files does not exists at the given location.

I see you are linking the two systems and then trying to access data. You need to provide proper access on ADBS system such that the file is exposed and accessible. Might be you need to share it and allow your other system to access. Once shared, instead of using absolute path of file on ADBS, use the relative path that you get on sharing. May be something like, "\\ADBS\Good\Manager.mdb", make sure what it would be before using.

For now, your MDB file is being expected on the system (at C: location) where you run these queries which is not correct and hence the error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900