Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update Conflict - wrong ID #!
Message
From
04/06/2001 05:24:26
 
 
To
03/06/2001 12:56:20
Paul Williamson
Williamson Enterprises, Inc.
Livingston, Montana, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00514333
Message ID:
00514452
Views:
12
Hi!

Quite strange things. Try to use the SQl Profiler to be sure what commands VFP sends to SQl Server when trying to do that update. This way you will be sure about the ID field used from another view. I never had such situation, so I cannot beleive the problem is in there. Just double check if this is true.

As about the updatable ID, you require to query it properly. ID used to find the record on SQl Serevr when updating data, so when it is incorrect, you will not be able to update record, or will update incorrect record because incorrect ID. In addition, when you add new records, ID require to be corrcetly generated or should be downloaded from server. For example, you insert record, update, SQL Server generates a new value for ID. Than, next time you try to update, ID field is emty on the local computer, so you cannot update or delete that record any more, because you do not know the ID. In such case you can requery the view, or get th last ID number from the SQl Server. This is a long complex story and you can read about this here at UT in many thred or somewhere else.

>Hi,
>
>I am using VFP6.0 and SQL Server 7.0.
>
>I get an Update Conflict error when attempting to update a remote view, when a user changes a record, with a TableUpdate(). Actually, when I go into debug at a point before the Begin Transaction starts, and the TableUpdate() and try to browse the view, I also get the error.
>
>I have researched the view and found that the ID Number field that VFP is trying to update is an ID number from a different view on a different table!! That ID number does NOT exist in the view I am trying to update, yet I get that error (which is a good thing I think because it is the wrong ID number).
>
>The remote view I am trying to update only has the ID number as the primary key, and it, nor the timestamp field, is selected as updatable. Send SQL updates is selected and if I uncheck that, I of course don't get the error.
>
>Any ideas? Let me know if any one needs more specifics, or code posted.
>
>Thanks,
>
>-paul
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform