Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append blank and replace
Message
From
06/05/1998 01:27:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/05/1998 16:22:08
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00097155
Message ID:
00097233
Views:
19
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform