Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Append blank and replace
Message
De
06/05/1998 01:27:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/05/1998 16:22:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00097155
Message ID:
00097233
Vues:
20
>I have this very irritating problem: it is in a very simple application which does very standard things:
>
>A record with some numerical totals has to be updated and/or created if it doesn't exist already.
>
>I search the table according to a tag, if not found, append blank, rlock the record and replace key fields with data and replace a field with a numerical total.
>
>Sometimes, not much but often, the record is created but the key fields are not replaced by the values. No other application is using the table, but the rlock doesn't seem to work. Most bizar is the index tag: the record is not updated but if you open the table according to the tag the record is in the order (place) where it would be if the fields were updated ok. What is happening?
>
>
>If somebody nows the reason, i'll be gratefull.
>
>
>Ivo
Ivo,
Without the actual code I wouldn't be able to say what's going on (just think what if rlock() fails ?). But I would suggest using "insert into" instead of append blank + replace. It's faster and no code in between.
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