Don't know it this will help. Works on my system but slow for 250000
records.
I have VFP linked server working through SQL Server.
I am using Foxpro 2.6, Sql Server Express 2005, Access 2003
FOXPRO. Execute the following on SQL Server to create a Linked Server into
the Foxpro Database
sp_addlinkedserver @server = 'LEDGERS',
@srvproduct = 'VFP',
@provider = 'VFPOLEDB.1',
@datasrc = 'c:\FileServer\Ledgers.bak\Company\Pyrotech'
Note using vfpoledb.1 (VFP 9.0) downloaded from
http://www.microsoft.com/downloads/details.aspx?FamilyId=E1A87D8F-2D58...1F-A0FA
THEN SETUP AN ACCESS PASSTHROUGH QUERY
http://www.techonthenet.com/access/tutorials/passthrough/basics01.php
Would like to figure out how to setup a passthrough query completely in VB
code.
SAMPLE QUERIES
SELECT * FROM OPENQUERY(Ledgers, 'select aufiscyear from accounts');
or
SELECT aufiscyear FROM Ledgers...accounts;
Note: SELECT * FROM Ledgers...accounts; doesn't seem to work
TO EDIT THE QUERY IN VISUAL BASIC
Dim dbsCurrent As Database
Dim qryTest As QueryDef
Dim sql As String
Set dbsCurrent = CurrentDb
Set qryTest = dbsCurrent.QueryDefs("queryname")
qryTest.sql = "SELECT * FROM Ledgers...accounts"
"Caine Schneider" wrote:
> Hello,
> I'm having a problem getting the VFPOLEDB provider to work with SQL Server
> 2005. I have installed the VFP 9.0 OLE DB provider from Microsoft, but the
> VFPOLEDB entry does not show up under Server Objects > Linked Servers >
> Providers.
>
> I was able to create a linked server using this command:
> EXEC sp_addlinkedserver @server = 'linksvr', @srvproduct = 'Visual FoxPro',
> @provider = 'VFPOLEDB', @datasrc = '\\server\path'
>
> and set it to run in process:
> EXEC master.dbo.sp_MSset_oledb_prop N'VFPOLEDB', N'AllowInProcess', 1
>
> However, when I run a query such as:
> SELECT * FROM linksvr...table
>
> I get the following error:
> Cannot create an instance of OLE DB provider "VFPOLEDB" for linked server
> "linksvr".
>
> I have stopped and restarted the MSSQLSERVER service and manually registered
> VFPOLEDB.dll.
>
> Kind of stuck at this point. This is on SQL Server 2005 Standard 64-bit
> edition. I have the Developer edition installed on my PC (with VS 2005) and
> these same commands work fine.
>
> Thanks for any pointers.
> Caine