Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote View Data Duplication
Message
From
10/12/2023 10:38:32
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
10/12/2023 07:40:01
Kato Ba
Bytex Technologies Limited
Kaduna, Nigeria
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01687405
Message ID:
01687412
Views:
36
>Hi,
>
>For all I know, there is an SQL Update strategy named "Delete and Insert".
>
>Do the old records get deleted?
>If no, is something stopping them to bet deleted, like a Trigger or whatever can block server side?
>
>I have not used Views for ages - and I recommend CursorAdapter instead of View - but at least the CA has something like UpdateStrategy. And since the CA somehow is mirrored in the DBSetProp, check this.
>
>Lutz
>
>Hi Lutz,
>
>I tried the SQL Update strategy named "Delete and Insert" and the old records don't get deleted. I also don't have any sort of trigger on the table. I am not able to wrap my head around what is happening.
>
>I have never used a CursorAdapter before. What do you think could be blocking the old records from being deleted?
>
>Alex

Hi Alex.

Just a side note: Please click to Hamburger menu top right of this window and check "Enable auto quote", it helps a lot reading.

Test UpdateType via cursorgetprop after the view is used.

I guess you do the obvious:
- Use YourView
- REPLACE something
- TABLEUPDATE()
?
And you do not touch the cguid field.

If you check GETFLDSTATE(-1) after the REPLACE, is there something indicating a new record?

Again, try to set up a Cursoradapter. The good on it is, that it offers BEFORE* events, where you can stop and look at the commands that are send to the server. This is not possible with a view.

The other thing I see is, try if you can protocol the commands on SQL Server side, possibly you see what is send to the server.

So far I see nothing bad on your set up. My best guess is GETFLDSTATE and see what's going on server side.

You say that the record is appended. Is cguid not marked as primary in the SQL Server?
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform