Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Insert-update-replace-update doesn't work
Message
From
28/10/2016 11:21:57
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
28/10/2016 09:41:48
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
MS SQL Server
Virtual environment:
VirtualBox
Miscellaneous
Thread ID:
01642269
Message ID:
01642445
Views:
34
>>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform