>>>Hi everybody,
>>>
>>>We're getting an intermittent error 1547
>>>"Cannot insert an empty row from a view or CursorAdapter into its base table(s).". It happens ~ once in 15 or more normal inserts. Where do you think should I look for this problem and what can I do?
>>>
>>>Thanks in advance.
>>
>>Here the description of the error:
>>
>>
>>While a view is updating, a new empty record (with no modified fields) is being inserted into one of the base tables of the view.
>>
>>Make sure each record inserted from a view into a base table has at least one field that has been modified in the view prior to
>>the view update.
>>
>>Are you sure you don't have somewhere an APPEND BLANK w/o any REPLACE after it?
>
>Let me double check. In the meantime, how can I specify default value for the field in CA? I'm using Mark McCasland's CA Builder.
You could use ConversionFunc:
this.ConversionFunc [FieldName this.SetDefalut]
*** SetDefalut method
LPARAMETERS leMyField
IF ISBLANK(FieldName) && Not parameter use field, because ISBLANK always will return .f.
RETURN (default_value_here)
ELSE
RETURN leMyField
ENDIF
But this is not tested at all.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.