Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cannot write to the record because it is in use (Error 1
Message
From
31/10/2003 16:08:07
 
 
To
31/10/2003 13:50:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00844916
Message ID:
00845222
Views:
19
I have found out why error happens.
In a ChildTable table I have field with DefaultValue which is UDF that returns value for that field.
When I issue APPEND BLANK then it goes to that function to retrieve value for field and at the end of function on RETURN lcValue (value for field) error happens.

When I removed UDF for DefaultValue it works, but I need that function for DefaultValue.
I notice that sometimes error happens and sometimes it let me to append with my value from UDF.
I don't why.
Help!




>>>>I have a Form class in which are two tables loaded (PARENTTABLE and CHILDTABLE).
>>>>
>>>>PARENTTABLE and CHILDTABLE are linked with CID_PARENT field in PARENTTABLE.
>>>>
>>>>When I want to do:
>>>>
>>>>SELECT childtable
>>>>APPEND BLANK
>>>>
>>>>VFP 8.0 shows:
>>>>Cannot write to the record because it is in use (Error 1502).
>>>>
>>>>I don't understand why?
>>>>
>>>>I have discovered that when in DataEnvironment I delete Relation object between those two tables error disapear, but I need that Relation.
>>>
>>>Do you have a referential integrity trigger on the child table for the foreign key? If so, could use INSERT - SQL and do something like:
>>>
INSERT INTO ChildTable (ParentID) VALUES (ParentTable.ParentID)
>>
>>No, I don't have referential integrity.
>
>Have you simplified the situation to figure out where, exactly the problem is? For example, did you create a plain form, add the two tables, add the relation, then try to append blank with, say just a click of a button?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform