Solved

No Success with Linked Server to FoxPro 2.6 DOS data (yet).

Posted on 2003-11-05
2
654 Views
Last Modified: 2008-03-10
I've tried to 'get at' some FoxPro 2.6 DOS data through SQL's Linkded Servers feature.  MS Access seems to work okay.  As well as MS Excel.  When I try to use OLE DB for ODBC data sources, ... not so much.  

I create an ODBC system DSN to FoxPro data with the Visual FoxPro driver version 6.xx.xxxx.   This seems to work well for MS Access databases that link to external data.  In Enterprise Manager, I can create the Linked Server, and when I click on 'Tables', all of the table names appear in the browse window.

If I start up Query Analyzer, then run a statement such as:

SELECT *
FROM TESTSVR01...Customer

I get an error message:

Server: Msg 7313, Level 16, State 1, Line 1
Invalid schema or catalog specified for provider 'MSDASQL'.

I suspect that the driver is too old/inadequate... or something.  If anyone can help, I would appreciate it.

Thanks,
Larry
0
Comment
Question by:larrycjr
2 Comments
 
LVL 32

Accepted Solution

by:
bhess1 earned 250 total points
ID: 9688558
I am afraid that you will need to use the OpenQuery syntax, rather than the direct linked server like you are attempting to use.

The direct syntax requires a database name in the dot format link.  In this case, you would have to have:

SELECT *
FROM TESTSVR01.<some DB name>..Customer

But, since the Foxpro naming convention (at least in that version) does not support DB names, you will be unable to use this.
0
 
LVL 6

Assisted Solution

by:PE_CF_DEV
PE_CF_DEV earned 250 total points
ID: 10155443
if you want to extract data from a foxpro database use the openquery syntax
so if you have a foxpro db FoxP you would do

Select sqlbd.field1, foxpro.field1
from mylocaltable sqldb INNER JOIN openquery(FoxP,'Select feild1 from table') ON slqbd.field1 = foxpro.field1

You will want to make sure to limit the ammount of data pulled from foxpro as much as possible so putting where clauseing in the openquery is recomended!
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

785 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