Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert-update-replace-update doesn't work
Message
 
 
À
24/10/2016 05:43:02
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Virtual environment:
VirtualBox
Divers
Thread ID:
01642269
Message ID:
01642273
Vues:
54
>Had a strange case... the scenario goes like this:
>
>
if not seek(...)
>    insert into ... (short field list, just keys) values (...)
>    tableupdate()
>endif
>...
>replace {four more fields}
>tableupdate()
>
>This was a fast job so I didn't really check the result of each tableupdate(); this is on cursoradapters, BTW. The weird thing is that in cases where the record was freshly inserted, the second tableupdate() didn't work. The quick and dirty solution was to run this twice, which worked so I didn't lose too much time on it (it had about 70000 records to create/update), but I'm just curious as to why would this happen at all.
>
>Did anyone have a horse of this color?

I think I remember something like this. And IIRC, the first tableupdate() moves the record pointer. Could it be the case?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform