Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GATHER NAME vs APPEND
Message
 
À
17/06/2004 16:05:14
Mike Yearwood
Toronto, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00914780
Message ID:
00915013
Vues:
12
>Hi all
>
>I've run an SQL command. I want to add those records to a table. I use APPEND FROM. If there is a field in the SQL result that has a value bigger than the corresponding field in the table, I don't get an error message. The value of that field will be *.**.
>
>If on the other hand, I want to update existing records from the SQL result, I could do this...
>
>SELECT c_Result
>SCAN
> SCATTER NAME loScatter
> SELECT TheTable
> GATHER NAME loScatter
>ENDSCAN
>
>The bigger SQL field will generate a Numeric overflow error. Why does it not just behave like the append?
>
>The error message does not say which property or field has the problem. I believe VFP should name the first field with a problem.
>
>One other thing. SQL Server 7 allows for this...
>
>UPDATE TheTable SET ;
>Field1 = c_Result.Field1 ;
>FROM TheTable, c_Result ;
>WHERE TheTable.PK = c_Result.PK
>
>Is there a way to use VFP's UPDATE - SQL to update all TheTable records from c_Result?
>
>Thanks!

Mike,

One thing that you can do with VFP 8 is to create an object an SCATTER NAME to it. By doing this you can add _ACCESS and _ASSIGN to the properties and they will fire with both SCATTER and GATHER. In those events, you can validate the data.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform