Bug #7841
Invalid conversion of temp table DMO when using clob/blob fields
0%
History
#2 Updated by Alexandru Donica 9 months ago
- File table-clob.p
added
- File table-blob.p
added
- File start.p
added
I created 2 temp tables, in separate procedures, with the same table name, same field types with same field names, but one of them had a field 'lob' with type blob, and the other table had one with type clob. AFAIK, FWD tries to combine temp-tables with similar enough fields so as to not create many classes. However, FWD combined the 2 temp tables I created in a single class, but with only 1 of the 'lob' fields. The lob type seemed to depend on which of the 4GL procedures/files was converted last.
If the file with the clob
was converted last, the Java class would have the 'lob' field as a clob
. A clob
managed to somewhat replace a blob
in the example below, however, when exporting the lob to a file, it would use the writeClob()
method in FileStream
instead of writeBlob()
. I imaged other discrepancies could arise with more testing (maybe when using a memptr/longchar
).
To change the order of conversion for each file, i renamed one to be alphabetically before/after the other file. (like table-clob.p
-> atable-clob.p
).
The name must also be changed in the start.p
file. If the file with the blob
was converted last, in my example, after conversion, the program would try to assign a clob
variable to a blob
field, and would not even compile.
I used the method copy_lob
from 4GL to take the value from a longchar
into a blob
. For a clob, I simply assigned it the value of a longchar
.