Re: connect foxpro to sql server and copy table



Hi Cindy,

I used code like this:

EXEC master.dbo.sp_addlinkedserver
@server = N'InterfacE',
@srvproduct=N'Microsoft Visual FoxPro OLE DB Data Provider',
@provider=N'VFPOLEDB',
@datasrc=N'D:\APPS\info\calc.dbc',
@provstr=N'VFPOLEDB.1'
GO

Select * From InterfacE...pwerk

and got this error message


(1 row(s) affected)


(1 row(s) affected)

Server: Msg 7403, Level 16, State 1, Line 2
Could not locate registry entry for OLE DB provider 'VFPOLEDB'.
OLE DB error trace [Non-interface error: Provider not registered.].


In the EnterPrise Manager I can see that InterfacE is added in Linked
Servers, but when opening the table I get the following message

error 7403 : Could not locate registry entry for OLE DB provider VFPOLEDB
OLE DB error tree [non-interface error : Provider not registered]

I installed the latest files (links below your signature).

Can you help me?

Bee



"Cindy Winegarden" wrote:

Hi Bee,

You can use a SQL Server Linked Server:

First, be sure you have the latest FoxPro and Visual FoxPro OLE DB data
provider, downloadable from the link below my signature.


I've successfully set up linked servers with code like this:


EXEC master.dbo.sp_addlinkedserver
@server = N'VFP_Northwind',
@srvproduct=N'Microsoft Visual FoxPro OLE DB Data Provider',
@provider=N'VFPOLEDB',
@datasrc=N'C:\Program Files\Microsoft Visual FoxPro
9\Samples\Northwind\Northwind.dbc',
@provstr=N'VFPOLEDB.1'


After that you can access data with the four-part naming convention:


Select * From VFP_Northwind...Customers (note 3 dots)


--
Cindy Winegarden
cindy@xxxxxxxxxxxxxxxxxxx


VFP OLE DB: http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC: http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx




"Bee" <Bee@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:D365A936-0883-4598-BA85-F0167CB2BA32@xxxxxxxxxxxxxxxx
Hi,

I would like to copy a table from a foxpro database to a sql server. I
tried
this in an access project with a ODBC link to the foxpro database, but
this
doesn't work. Therefore I would like to make a direct link in het sql
database to the foxpro database. I did a test in an access, visual basic
and
this work:

Set cn = CreateObject("ADODB.Connection")
cn.ConnectionString = _
"DSN=Visual FoxPro Database;UID=;PWD=;" & _
"SourceDB=p:\info\calc2.DBF;SourceType=DBF;" & _
"Exclusive=No;BackgroundFetch=Yes;" & _
"Collate=Machine;Null=Yes;Deleted=Yes;"

cn.Open

How do I copy a table from this database into a SQLdatabase tabel?



.



Relevant Pages

  • Re: odbc with vfp
    ... Have you considered using the FoxPro and Visual FoxPro OLE DB data provider, ... need quotes around the data source string if it has spaces in it. ... I'm not sure what you mean about security on the server. ... i need to create the ODBC connection and got two ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Perflib errors in event logs after SP2 installation
    ... the server does seem to be working fine. ... System account is a potential security risk. ... Policy provider runs under the Local System account, ... Microsoft CSS Online Newsgroup Support ...
    (microsoft.public.windows.server.sbs)
  • Random Network Disconnects
    ... network and the only way I can seem to get it back up is to restart the box. ... Testing IpConfig - pinging the Secondary WINS server... ... DNS Host Name: itdspstest01.itd.edited.edited ... Provider Version:2 ...
    (microsoft.public.windows.server.dns)
  • Re: No inbound emails from outside domain
    ... IntelPRO/1000 MT Server Adapter - Packet Scheduler ... Provider Version:2 ... Description: MSAFD NetBIOS ... I don't think reinstalling Exchange will help. ...
    (microsoft.public.windows.server.sbs)
  • Re: MIDAS/Datasnap Alternative
    ... DDCAppservice is an I/O Completion Ports ... efficient way of developing server applications. ... Increasing the client base does not typically require ... component for each logical data provider. ...
    (borland.public.delphi.thirdpartytools.general)

Loading