>>>I'm getting an error that oHL7ComponentSeparator is not found. If I'm creating it on that line, why is it looking for it?
>>>
>>>
>>> **********************************************************
>>> PROCEDURE ProcessData(Company, DataExchangeType, DataArea, KeyFieldValue)
>>>
>>> DODEFAULT()
>>>
>>> LOCAL strProcessData, strAcknowledgment
>>>
>>> strProcessData = ''
>>>
>>> THIS.oHL7ComponentSeparator = CREATEOBJECT('empty')
>>>
>>
>>Because that property is not defined before that row. You could use:
>>
>>PROCEDURE ProcessData(Company, DataExchangeType, DataArea, KeyFieldValue)
>> DODEFAULT()
>> LOCAL strProcessData, strAcknowledgment
>> strProcessData = ''
>> IF PEMSTATUS(this,[oHL7ComponentSeparator],5)
>> THIS.oHL7ComponentSeparator = NULL
>> ELSE
>> ADDPROPERTY(this,[oHL7ComponentSeparator])
>> ENDIF
>> THIS.oHL7ComponentSeparator = CREATEOBJECT('empty')
>>...
>>
>
>I tried using the NULL before it, but I got an error on that too. Not with your code, but with mine.
That is because you didn't check for existence of that property. Properties unlike variables aren't created dynamically, you must defined them in the designer, or use ADDPROPERTY() function (I use it, because not all classes have .AddProperty() methond)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.