Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking a DBF to a SQL Table

Status
Not open for further replies.

AnthonyWhitehouse

Programmer
May 7, 2009
8
NZ
Greetings. I work with an older Foxpro system and have created a utility to extract data via setting ExportSQL = "Select......" and then

Set dbCompany = OpenDatabase(strDatabase, dbDriverComplete, False, "FoxPro 2.6")
Set RsTmp = dbCompany.OpenRecordset(ExportSQL, dbOpenDynaset)

This works fine for most of my data, which is in DBF tables in one Company Directory.

I would now like to include some data from a SQL Database. Is there any way to create a "pointer" in my Company Directory to the required SQL Table?

My hope is that I could then Join to it using the uniqueid that is common in both my DBF and SQL table.
 
Any database system can only join tables it can access both.

One solution is to query both DBF data and SQL data into foxpro result cursors and then join locally.

Another solution is to insert data into an SQL temp table for joining on the server side.

And a third is to add DBFs as a linked server, but if you don't know what a linked server is forget that for the moment.

Where is the larger part of the data? In the dbfs or in the SQL Server. I would retrieve or export the smaller portion of data and join in the system with the larger part of the data.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top