Home > Archive > MS SQL Server ODBC > March 2006 > Linking to FoxPro files from SQL Server









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Linking to FoxPro files from SQL Server
Teri Welch

2006-03-10, 1:23 pm

Hello,

We are fairly new to SQL Server and and hope someone can help us. From SQL
Server we need to link to FoxPro tables in the accounting (SBT) system. We
started to setup a Linked Server but didnt get very far. For example if we
wanted to link to a FoxPro Product table called PROD we would see the
following files to choose from: PROD.DBF, PROD.CDX, and PROD.ADX). Assuming
the FoxPro files are located in C:\DATA how can we accomplish the linking?

1) Would we want to use the ODBC driver or the Visual Foxpro driver to link?
The FoxPro version is 5 years old.

2) Based on the information given above, what are the specific parameters
needed to create the linked server?

3) Once a link is established, can we filter records from the underlying
FoxPro table because it contains hundreds of thousands of records we dont
need to access.

Thanks,
Teri




Cindy Winegarden

2006-03-10, 1:23 pm

Hi Teri,

Download and install the latest FoxPro and Visual FoxPro OLE DB data
provider from msdn.microsoft.com/vfoxpro/downloads/updates.

I'm using SQL 2005; your dialog may be a little different. For a linked
server in SQL Server use the following:

Linked Servers > New Linked Server ...

Linked Server: MyLinkedServer
Provider: Choose "Microsoft OLE DB Provider for Visual FoxPro"
Product name: Visual FoxPro (I think this is optional)
Data source: "C:\Program Files\Microsoft Visual
FoxPro9\Samples\Nort
hwind\Northwind.dbc" (Include quotes since there's
spaces in the string.)

Provider string: VFPOLEDB.1
Location: (blank)
Catalog: (blank)
Security page and Server Options page take defaults.

A linked server acts pretty much like any other SQL table - the data is not
"imported" so you won't get all the records you don't want if you filter
them out using your Where clause. To select data use :

Select * From MyLinkedServer...TableName Where Record <> OnesIDon'tWant


--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn
.com www.cindywinegarden.com


"Teri Welch" <trwlch@yahoo.com> wrote in message
news:e2jQf.60378$Ug4.10809@dukeread12...
> Hello,
>
> We are fairly new to SQL Server and and hope someone can help us. From SQL
> Server we need to link to FoxPro tables in the accounting (SBT) system. We
> started to setup a Linked Server but didnt get very far. For example if we
> wanted to link to a FoxPro Product table called PROD we would see the
> following files to choose from: PROD.DBF, PROD.CDX, and PROD.ADX).
> Assuming
> the FoxPro files are located in C:\DATA how can we accomplish the linking?
>
> 1) Would we want to use the ODBC driver or the Visual Foxpro driver to
> link?
> The FoxPro version is 5 years old.
>
> 2) Based on the information given above, what are the specific parameters
> needed to create the linked server?
>
> 3) Once a link is established, can we filter records from the underlying
> FoxPro table because it contains hundreds of thousands of records we dont
> need to access.
>
> Thanks,
> Teri
>
>
>
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com