Home All Groups Group Topic Archive Search About

How Can I Update DBF foxpro Table From Sp

Author
27 Jul 2006 2:17 PM
Taha
Hi all
How Can I Update DBF foxpro Table From Sp

Tankes

Author
27 Jul 2006 6:57 PM
Cindy Winegarden
Hi Taha,

One way is to use a linked server. Here's some of what I posted elsewhere
about using FoxPro linked servers:

Use the FoxPro and Visual FoxPro OLE DB data provider, downloadable from
msdn.microsoft.com/vfoxpro/downloads/updates. Set up your linked server as
follows:

-- For the @DataSrc value, if your Fox tables are "free" tables (no DBC file
is present in the directory) use only the path to the directory and put
double quotes around it if it has spaces. Something like '"C:\My
Directory\"'
-- If a DBC files is present the @DataSrc value needs to point to the DBC
file as below.

EXEC master.dbo.sp_addlinkedserver
    @server = N'VFP_NORTHWIND',  -- Your linked server name here
    @srvproduct=N'Visual FoxPro 9',  -- can be anything
    @provider=N'VFPOLEDB',
    @datasrc=N'"C:\PROGRAM FILES\MICROSOFT VISUAL FOXPRO
9\Samples\Northwind\Northwind.dbc"',             @provstr=N'VFPOLEDB.1'

Then, you can query your tables like:
Select * From YourLinkedServer...YourTable
-- Note 3 dots, and don't use the DBF extension such as YourTable.dbf. Even
if your data source points to a DBC file just use the table name you want to
select from.


--
Cindy Winegarden  MCSD, Microsoft Most Valuable Professional
ci***@cindywinegarden.com


Show quote
"Taha" <taha***@hotmail.com> wrote in message
news:OBZGgdYsGHA.4992@TK2MSFTNGP02.phx.gbl...
> How Can I Update DBF foxpro Table From Sp

AddThis Social Bookmark Button