Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Vfp6 with MS Sql server 7 SPT
Message
De
27/11/2003 10:32:38
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/11/2003 08:31:42
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00853955
Message ID:
00854023
Vues:
15
>let me make myself more clear
>
>eg i have a local table and would like to fetch the results from another table on the sql server using one of the fields as the parameter.
>
>suhas

Suhas,
OpenRowset() - You already have the details, for others to benefit I'm writing the sample here too :)
Create Table myCountries (country c(10))
Insert into myCountries values ('USA')
Insert into myCountries values ('Germany')
Insert into myCountries values ('Canada')
use

lnHandle=SQLStringConnect('DRIVER=SQL Server;SERVER=servername;Trusted_connection=Yes')
SQLExec(lnHandle, ;
 "select * from Northwind.dbo.customers as rmtR"+;
 "   inner join OPENROWSET('VFPOLEDB.1', "+;
 "   '"+Sys(5)+Curdir()+"';'';'',"+;
 "   'select * from myCountries') as locR"+;
 "  on rmtR.country = locR.country",'myResult' )
SQLDisconnect(lnHandle)
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform