Page 1 of 1

TIBCScript: ExecuteStream

Posted: Fri 09 Aug 2013 07:49
by upscene
Hi,

What kind of Stream does this expect? Does it have to include an Encoding BOM?

Or does it expect a UnicodeString stream?

with regards,

Martijn Tonies

Re: TIBCScript: ExecuteStream

Posted: Fri 09 Aug 2013 12:40
by AndreyZ
Hello,

If first two bytes are FFFE, the Unicode encoding (two bytes per symbol) is used. If first two bytes are EFBB, the UTF-8 encoding (four bytes per symbol) is used. Otherwise, the default encoding (one byte per symbol) is used.

Re: TIBCScript: ExecuteStream

Posted: Fri 09 Aug 2013 12:45
by upscene
Hello Andrey,

Right, so a BOM is expected for Unicode.

Thanks.

Re: TIBCScript: ExecuteStream

Posted: Fri 09 Aug 2013 13:21
by AndreyZ
Glad to help. If any other questions come up, please contact us.

Re: TIBCScript: ExecuteStream

Posted: Fri 09 Aug 2013 14:45
by upscene
One more thing :)

How does it parse the script in the stream, does it load the entire stream into memory, or does it load from the stream until a full statement is found?

I'd like to know if this method can be used to execute (very) large scripts.

with regards,

Martijn Tonies

Re: TIBCScript: ExecuteStream

Posted: Mon 12 Aug 2013 08:20
by AndreyZ
TIBCScript reads the data from the stream by 64 Kb chunks. When the next chunk of data is needed, the previous chunk is released.
To execute large scripts, you should use the TFileStream class, as it does not load all file (with the script) to the memory.

Re: TIBCScript: ExecuteStream

Posted: Mon 12 Aug 2013 08:25
by upscene
Excellent, thanks!

Re: TIBCScript: ExecuteStream

Posted: Mon 12 Aug 2013 09:04
by AndreyZ
Feel free to contact us if you have any further questions about IBDAC.