Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update VFP cursor with sqlserver table
Message
 
À
29/11/2017 01:37:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows 7
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01655933
Message ID:
01655936
Vues:
53
>Dear Experts
>
>I have following codes
>
>
>text TO cmd noshow
>select code,name
> from sale
>ENDTEXT
>
>if sqlexec(con,cmd,'table1')<0
>	aerror(laerror)
>	messagebox(laerror[1,2])
>	return
>endif
>
>
>table2="crs"+sys(2015)
>select * from table1 into cursor table2 readwrite
>
>
>Now I want to update table2.name with sqlserver table master like this
>
>
>update table2.name=master.name from master where table2.code=master.code
>
>
>how is it possible?
text TO cmd noshow
     select code,name
           from sale;

     select sale.code,Master.name
           from sale
     INNER JOIN Master ON sale.Code = Master.Code;
ENDTEXT

if sqlexec(con,cmd)<0
   aerror(laerror)
   messagebox(laerror[1,2])
   return
endif


table2="crs"+sys(2015)
select * from SQLRESULT into cursor (table2) readwrite

table3="crs"+sys(2015)
select * from SQLRESULT1 into cursor (table3) readwrite
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform