Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert-update-replace-update doesn't work
Message
De
28/10/2016 11:21:57
 
 
À
28/10/2016 09:41:48
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:
01642445
Vues:
35
>>first check would be key column after insert and update pattern...
>>perhaps log called in hook methods on record level of CRUD executing from CA
>
>Followed those in the debugger and it found no errors. Then traced it in the profiler (express profiler, that is - much easier on a single user machine) and saw that the where clause of the update statement was quite long. Ran that statement in Toad and it returned no errors, updated no records. Because some of the values mentioned in the where clause were wrong - wrong length or whatever.
>
>Because my cursoradapter class simply defaulted to .wheretype=3. Changed it to 1 and it all works as advertised.

Hitting on a salvo of 2 shots only is ok for Fryday ;-)
Long ago I decided to either use db_Key or db_KeyTimestamp - and also if possible to use an incremental counter under own control as "Timestamp" instead of Timestamps generated possibly with different definitions across backends. Never regretted it - except for the times I had to describe the reasons for that decision to those wanting to use the server timestamps (there was even one wanting to use client TS, as they set the system clock EACH time on login. Good that they had no alcohol where the bullshit bingo sessions were held - I would have turned alcoholic from despair)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform