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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help: Linked Server To dBASE Data Files

Status
Not open for further replies.

stevesaved

Programmer
Jul 29, 2003
11
0
0
GB
Greetings,

I have a directory on the network called 0:\ESPEC\PDM, which contains dBASE files (*.dbf).

I have created a linked server in SQL Server using the following command:

exec sp_addlinkedserver
@server='Test2',
@srvproduct='db5',
@provider='MSDASQL',
@datasrc='PDMdBASE'

I also have an ODBC data source called PDMdBASE (system DSN) which points to the directory containing the dBASE files. When I try to access data in the dBASE files SQL Server tells me that my table name does not exist, even though it does:

SELECT * FROM Test2.[O:\ESPEC\PDM]..ATAB

Produces:

OLE DB provider 'Test2' does not contain table '`O:\ESPEC\PDM`\`ATAB`'. The table either does not exist or the current user does not have permissions on that table.

ATAB.DBF DOES exist in O:\ESPEC\PDM

Does anyone have any clues on how to make this work?

Thanks for your help.
 

1 - The DSN must be created on SQLServer

2 - Test this

SELECT *
FROM OPENQUERY(Test2,SELECT * FROM ATAB.DBF)


Good Luck!
 
Thanks for all your help.

I decided to use the OPENDATASOUCE cammonad to access and update the dBASE files.

Regards.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top