xo123
asked on
LibraryExport() for long script
I used LibraryExport() to export a Window object in PB5.
But the object is too large that it can only export partially.
How can I fix the problem if I want to use script instead of the Export Painter
to export objects?
But the object is too large that it can only export partially.
How can I fix the problem if I want to use script instead of the Export Painter
to export objects?
Btw, this is not PB limitation, but OS limitation.
ASKER
I think I'm using 32bit.
This is the info from 'About'
PowerBuilder Enterprise/32
by Powersoft
Version 5.0.04
Copyright c 1991 - 1997 Sybase, Inc.
and its subsidiaries.
.....
This is the info from 'About'
PowerBuilder Enterprise/32
by Powersoft
Version 5.0.04
Copyright c 1991 - 1997 Sybase, Inc.
and its subsidiaries.
.....
Does the string gets truncated when you run the app thru development environment as well? What operating system you are using?
ASKER
For any objects longer than 32 KB,
the libaryexport() can only export them to 32 KB long.
But if I used the Library painter's Export option, it can export successfully without loss.
Here's my coding:
....
String ls_objsyn
ls_objsyn = LibraryExport( lib_path, obj_name, DirWindow! )
....
the libaryexport() can only export them to 32 KB long.
But if I used the Library painter's Export option, it can export successfully without loss.
Here's my coding:
....
String ls_objsyn
ls_objsyn = LibraryExport( lib_path, obj_name, DirWindow! )
....
ASKER
I'm using Window 2000 Professional.
ASKER
Oh.... I just discover one thing:
FileWrite can write only 32,766 bytes at a time, which includes the string terminator character. If the length of variable exceeds 32,765, FileWrite writes the first 32,765 characters and returns 32,765.
I'm using FileWrite() for writing the export script.
What can I do?
FileWrite can write only 32,766 bytes at a time, which includes the string terminator character. If the length of variable exceeds 32,765, FileWrite writes the first 32,765 characters and returns 32,765.
I'm using FileWrite() for writing the export script.
What can I do?
ASKER
I'll try to partition the export script (ls_objsyn) and write each partition at a time.
OK. Using filewrite you can only write 32k at a time. Try PFCs of_FileWrite. I think of_filewrite can handle more than 32K.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
16 bit string datatype can only hold 64K.