Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combining VFP and SQL Server data in a join
Message
 
À
09/11/2009 18:10:16
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01433921
Message ID:
01433923
Vues:
55
I do not know if it is the most efficient way, but what I would do is

1- In SQL Server I would create a Linked Server that uses an ODBC linked to a VFP folder where the table is, let's call it VFPDATA
2- In the backend (fox) I would use SQL passthru, or a direct SQL in a SQL StoreProcedure that will perform the join using OpenQuery, something like
SELECT TableA.FieldList, TableB.FieldList
from SomeSQLTable TableA
JOIN OpenQuery(VFPDATA, 'Select * from VFP_Table where SomeCondition') TableB ON TableA.SomeKey = TableB.SomeKey
Or the other way around, the from with the OpenQuery and the Join to the SQL Data.

>Hi
>
>I'm doing an app that has to join data from a VFP free table with data stored in SQL Server.
>I have the VFP data in a datatable.
>I'm using SQLCommand to access the SQL Server data and have that in a datatable.
>Any suggestions as to the best and most efficient way to join the data so that I can use the joined results as the datasource of a datagridview?
>
>
>
>.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform