Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Modifying a cursor
Message
De
18/06/2014 01:32:40
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
17/06/2014 17:39:18
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 5
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01602016
Message ID:
01602023
Vues:
71
#1 It's legal
#2 It's the same name (in fact a cursor with the same alias)
#3 It's a different cursor
#4 A cursor structure can not be altered (The command is ALTER TABLE)

The problem is that it will work like closing the first cursor and creating a new one rather the modifing the old one.
If you have a CONTROLSOURCE bound to the first cursor it is lost. If you simple work with the cursor in subsequent SELECT etc it's no problem

If you need to alter a structure, you would need SELECT .. INTO Table and later ALTER TABLE

Lutz

>Hi All:
>
>What is the best way to add to more columns to a cursor and still remain with the same name?
>
>i.e. is this legal:
>
>
>Sele custno, fieldb ;
>from Table1 ;
>Into Cursor cursor1
>
>sele cursor1.*, nvl(cursor2.sales, 0) ;
> from cursor1 c1 ;
>left outer join cursor2 c2 ;
>on c1.custno = c2.custno ;
>into cursor cursor1   &&  <==Same Name
>
>
>I'm in VFP5, but that should no make any difference; I'll test that.
>
>Thanks,
>
>Yossi
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform