Options

Blob to BigText Missing something

derekj22derekj22 Member Posts: 16
On Page 5906 (Service Item Worksheet), I have added a variable "RemarksLongText". This variable is the one that a user will ad text to on the page. I have added a Field to the Service Header Table called Remarks as type blob.

I have the following code that works:
Remarks - OnValidate()
IF RemarksLongText.LENGTH > 0 THEN
MESSAGE('Should Save');
ServHeader.Remarks.CREATEOUTSTREAM(Ostream);
RemarksLongText.WRITE(Ostream);
ServHeader.MODIFY;

IF ServHeader.Remarks.HASVALUE THEN
BEGIN
ServHeader.Remarks.CREATEINSTREAM(Istream);
RemarksLongText.READ(Istream);
MESSAGE('Should have read %1', RemarksLongText.LENGTH);
END;

If I use the code below in the AfterGetRecord(), AfterGetCurrentRecord(), or OnOpenPage() I get RemarksLongText.LENGTH is equal to 0.

IF ServHeader.Remarks.HASVALUE THEN
BEGIN
ServHeader.Remarks.CREATEINSTREAM(Istream);
RemarksLongText.READ(Istream);
MESSAGE('Should have read %1', RemarksLongText.LENGTH);
END;


I have proved that the OutStream InStream works in the validate and that the data is in the database.

What I am wanting to know is what am I missing that I cannot get my variable to Read the Instream

Best Answer

Answers

Sign In or Register to comment.