avishay
27th July 2005, 14:06
Hi all

I read a text from tttxt010 and when writing it to a file I get some "Enter" with it.
:confused: Maybe char(10) char(13) BUT I'm not sure.

MY QUESION IS:
how can i replace this "ENTER" with space " ".

thanks
Avishay

bdittmar
27th July 2005, 18:56
Hi all

I read a text from tttxt010 and when writing it to a file I get some "Enter" with it.
:confused: Maybe char(10) char(13) BUT I'm not sure.

MY QUESION IS:
how can i replace this "ENTER" with space " ".

thanks
Avishay

Hello Avishay,

whot do you mean with "ENTER" ?
End of line {CR} {LF} ?

You are on HPUX ??? or MS ???

How do you write the text to file, please explain. Because help is easyer to practice.


The Text in BaaN is stored in Database per Line !

Regards

tab0529
27th July 2005, 21:11
Hello Avishay,

I have run into this before and the character is probably a char(10).

Since you are on Oracle (8.0 and higher, perhaps earlier will work), try this Oracle SQL code to find out exactly what you are dealing with.

select t$text, dump(t$text) from baan.ttttxt010nnn where t$ctxt = ???;

where nnn is the company number and ??? is the text number from your primary data record. This will give you both the actual readable text and the ascii character code of the record from the text table.

If you want to do this from a program script, then you might try setting a string variable to char(10) and then use the pos() command. You could then use the position value to replace the char(10) with something else. I did not test this in a program script, but I think it should work. You probably should run the pos() in a loop in case there is more than 1 in your line.

Regards,

Hitesh Shah
29th July 2005, 13:35
I think text.to.buf function can get u text data in string .

long TEXT.TO.BUF( string text_field(17), string lang,
long nr_lines, ref string buf(,) )
This function stores the text of text_field for the given language into
the two dimensional array buf. The nr_lines argument contains the
maximum number of lines that may be stored in the buffer.

Possible return values:
> 0: number of stored lines
0: error
- 1: no permission to store the text