Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Key differs between view & table
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00332312
Message ID:
00336277
Views:
24
thanks to all who have replied to this.

I have had clients in town all week, and today was install W2000 on a machine, not on the W2000 list by Compaq.

I'll make this change later tonight.

Once again, thanks.

__Stephen

>Stephen, All,
>
>I sent a private message earlier, but haven't heard back yet...so here's the public version!
>
>As Professor Bill Hartgrove pointed out, removing the SETFLDSTATE in KBizObj.OnNew() may seem to solve the double-dip ID problem, but actually creates other issues.
>
>As it turns out, we haven't been able to recreate the problem at Bill's site since I arrived this week...apparently I've put the "fear 'o God" into it <bg>. But the problem really boils down to a Visual FoxPro bug with the SETFLDSTATE command.
>
>SETFLDSTATE is issued on the primary key in KBizObj.OnNew() to set the field as "unchanged". Conversely, when KBizObj.oBehavior.Save() is executed, it sets the status of the unique ID field back to "changed". This is apparently where the problem is occurring...sometimes VFP doesn't see the unique ID field as changed, even though SETFLDSTATE set it to be changed!
>
>To get around this VFP bug try the following:
>
>1. Open the CDataBehavior class located in CBhavior.vcx
>2. Change the following code in the SetPrimaryKeyFieldState():
>
>Change...
>=SETFLDSTATE(lcPrimaryKey, tnFieldState)
>
>To...
>REPLACE (lcPrimaryKey) WITH EVAL(lcPrimaryKey)
>
>3. Close the class and save changes.
>
>This should get around the problem since we're physically changing the field value...unfortuantely, since we can't break it here, we can't test the fix. If any of you folks can implement this and verify the fix, I'd appreciate it!
>
>Thanks,
>Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform