Go Premium for a chance to win a PS4. Enter to Win

x
?
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
Medium Priority
?
385 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
2 Comments
 
LVL 43

Accepted Solution

by:
pcelba earned 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Loops Section Overview

877 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