Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: naveed ahmad
  Where is naveed ahmad?
 peshawar
 Pakistan
 naveed ahmad
 To: Tore Bleken
  Where is Tore Bleken?
 Stokke
 Norway
 Tore Bleken
 Tags
Subject: RE: how to control chr ' * ' in table
Thread ID: 396046 Message ID: 396171 # Views: 29 # Ratings: 0
Version: Visual FoxPro 9 Category: General VFP Topics
Date: Thursday, January 23, 2014 8:41:55 AM         
   


> >
> >
> > sir thanks for reply
> >
> > IF thisform.pckmun > 0
> > m.kgrat = thisform.price/thisform.pckmun
> >
> > ELSE
> > m.kgrat = 0
> >
> > ENDIF
> > IF thisform.pckkarte > 0
> > m.trayrat = thisform.price/thisform.pckkarte
> >
> > ELSE
> > m.trayrat = 0
> >
> > ENDIF
> >
> > Select pstock
> > If munn > 0
> > Update pstock Set tot_value = (m.kgrat*(munn*pck_mun+kg))
> > Else
> > Update pstock Set tot_value = (m.trayrat*(karte*pck_karte+tray))
> > Endif
> > its work first time well but secondly when i give the same item code then it last entry convert in 0. i think you got my problem right now.
> > best regards.
>
> You miss a Where statement in your Update commands, so you update every record in the table!
>
> By the way, you don't need the "Select pstock" line, Since Update selects the table automatically.
>
> There's a fine line between helping and adding to the confusion.
>
> How to create sample data

thanks a lot sir
regards

ENTIRE THREAD

how to control chr ' * ' in table Posted by naveed ahmad @ 1/22/2014 2:23:29 PM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/22/2014 2:44:00 PM
RE: how to control chr ' * ' in table Posted by Borislav Borissov @ 1/22/2014 4:11:04 PM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/22/2014 4:29:16 PM
RE: how to control chr ' * ' in table Posted by Borislav Borissov @ 1/22/2014 5:10:53 PM
RE: how to control chr ' * ' in table Posted by Jun Tangunan @ 1/23/2014 5:32:21 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 7:45:11 AM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/23/2014 7:52:11 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 8:08:13 AM
RE: how to control chr ' * ' in table Posted by Tore Bleken @ 1/23/2014 8:14:53 AM
RE: how to control chr ' * ' in table Posted by naveed ahmad @ 1/23/2014 8:41:55 AM