Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Hide grid column
Message
De
23/02/2005 11:54:37
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
23/02/2005 11:48:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
00989465
Message ID:
00989685
Vues:
71
>This is the code i have in the afterrowcolchange
>
>*Actualizar las información de total
>SELECT Sum(Puerto1) As Libras FROM tmpDistribucion INTO CURSOR tmpTotalPuertos
>
>UPDATE curTotalDetalle SET Puerto1 = tmpTotalPuertos.Libras WHERE TipoTotal = "Libras Totales"
>
>USE IN tmpTotalPuertos
>
>i am showing this in a grid "curTotalDetalle"
>
>when i move to a new row, the value is updated, if i move to a new column in the same row the value is not updated.

Oh my. Wish you told what you were trying to do from the start. This is the worst way to get totals IMHO. Why do you sum each time you change a value in a column. Other rows have old values and no need to calculate again.
All you need is an initial sum. Store the result somewhere. Then when a column value changes add (NewValue - OldValue) to StoredTotal.
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