Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blob-Problem

Status
Not open for further replies.

cagiv

Programmer
Mar 5, 2009
56
DE
Hi @all,

i have a mysteriös Problem with loading and saving text in a blob-field (oracle).

loc:blob CSTRING(28800)

Init Embed (at last):
IF SIZE(PRTB:Content) > 0
loc:Blob = PRTB:Content[0 : SIZE(PRTB:Content) - 1]
ELSE
loc:Blob = ''
END

Save (Ok Button):
PRTB:Content{PROP:Size} = 0
PRTB:Content{PROP:Size} = LEN(CLIP(loc:Blob))
PRTB:Content[0 : LEN(CLIP(loc:Blob)) - 1] = CLIP(loc:Blob)


I try to describe the Problem:

There are 2 records in Database. Text in first record is longer than text in second record.
On the Dialog there is a textfield use loc:blob.

I load from browse first record and see the normal text in field. It's all ok. I close the dialog and open the second record.
Then i see the text from second record + the text from first record. It's not ok.

Example:
Text in 1st record:
xxxxxxxxxxxxxxxxxxxxxxxxxxx

Text in 2nd record:
yyyyyyyyyyyyy

Open 1st record i see:
xxxxxxxxxxxxxxxxxxxxxxxxxxx

Open 2nd record i see:
yyyyyyyyyyyyyxxxxxxxxxxxxxx

What can be the problem? I tried so many, for example loc:blob as String or Fetch the record again...


regards, cagiv
 
Hi!

You seem to be using a mix of SIZE & PROP:Size. Use PROP:Size only.

Change the Init to ::

CLEAR(LOC:Blob)

S# = PRTB:Content{PROP:Size}
IF S# > 1
LOC:Blob = PRTB:Content[0 : S#-1]
END

and ideally the SAVE code to ::

S# = LEN(CLIP(LOC:Blob))

PRTB:Content{PROP:Size} = 0
IF S# > 0
PRTB:Content{PROP:Size} =
PRTB:Content[0 : S#-1] = CLIP(LOC:Blob)
END


Regards
 
Hi,

thanks for your help, but it changed nothing.
Do you have still another idea?

Regards, cagiv
 
Hi!

Have you queried the database directly using any query tool to see what is actually stored in the database?

Is this a standard template generated Browse-Form? Why cannot you just link the Text Box to the BLOB column i.e. why is a local variable required?

Regards
 
Hi!

You could always try LOC:Blob = ALL('<0>',SIZE(LOC:Blob)) in the Init Code.

Regards
 
Hi,

the correct string is saved in database. I checked it.

It's a Standard-Updateform.

A textbox use db-field directly, shows nothing. That's the reason i use a local variable.

I do not understand so correctly, what the code
LOC:Blob = ALL('<0>',SIZE(LOC:Blob))
has todo with the problem. It only returns repeated characters.

Thanks again, cagiv
 
Hi,

i have the solution.
I use a RADSQL-Browse and there was flaggt pageloaded instead of fileloded. It seems to make a memory-error.
Now with fileloaded it's all ok :)

Regards, cagiv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top