Solved

How do I configure a Linked Server in Microsoft SQL Server 2008 to use Microsoft Visual Fox Pro OLE DB as the provider?

Posted on 2009-05-14
2
382 Views
Last Modified: 2012-05-07
When I try to setup a Linked Server in Microsoft SQL Server 2008 to use Microsoft Visual Fox Pro OLE DB as the provider, I cannot query the data source.  Can you provide the syntax needed to setup the new linked server (e.g., data source, product name, provider string, etc.).
0
Comment
Question by:Sparqware
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 42

Accepted Solution

by:
pcelba earned 125 total points
ID: 24389985
I've created linked server named fox, scripted it and the result works. Now it is possible to execute SQL commands on VFP tables in specified folder (e.g. select * from fox...TblName).

FYI, the linked server function failed if the datasrc path contained spaces.

What is your error message when testing the connection to linked server?

/****** Object:  LinkedServer [FOX]    Script Date: 05/14/2009 21:16:32 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'FOX', @srvproduct=N'', @provider=N'VFPOLEDB', @datasrc=N'd:\LinkFox\'
 /* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'FOX',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
 
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'collation compatible', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'data access', @optvalue=N'true'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'dist', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'pub', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'rpc', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'rpc out', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'sub', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'connect timeout', @optvalue=N'0'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'collation name', @optvalue=null
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'lazy schema validation', @optvalue=N'false'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'query timeout', @optvalue=N'0'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'use remote collation', @optvalue=N'true'
GO
 
EXEC master.dbo.sp_serveroption @server=N'FOX', @optname=N'remote proc transaction promotion', @optvalue=N'true'
GO
 
-- some resources recommend to execute:
EXEC master.dbo.sp_MSset_oledb_prop N'VFPOLEDB', N'AllowInProcess', 1 
GO 

Open in new window

0
 

Author Closing Comment

by:Sparqware
ID: 31581624
It turns out my problems were related to the AllowInProcess property.  Once I set that to yes, then it worked fine.  Thanks!
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question