Renegade
18th June 2003, 11:03
I am on Baan IVc3

Given below is my line of code for loading text into tiitm001.txta. I am writing to a file - temp_file.txt and then giving the path in text.write() Problem is, it always returns 0. Inserting a text in tiitm001.txta and tttxt001 but not in txt002 or txt010... i.text contains the text string


if not isspace(i.text) then
fs = seq.open("/export/home/users/senthil/temp_file.txt", "w+")
seq.puts(i.text,fs)
seq.close(fs)

DB.RETRY.POINT()
select tiitm001.*
from tiitm001 for update
where tiitm001._index1 = {:item}
selectdo
ret = text.rewrite("tiitm001.txta","2","text", "","",
"","text","text", "/export/home/users/temp_file.txt")
db.update(ttiitm001,DB.RETRY)
commit.transaction()
selectempty
endselect
endif

Renegade
18th June 2003, 11:04
I have tested with text.write() also. And it always returns 0.

Renegade
18th June 2003, 11:06
extremely silly mistake.....

path differs.....

apologies for anyone who spent time on this....