TIBCScript: ExecuteStream
TIBCScript: ExecuteStream
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
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
-
AndreyZ
Re: TIBCScript: ExecuteStream
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.
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
Hello Andrey,
Right, so a BOM is expected for Unicode.
Thanks.
Right, so a BOM is expected for Unicode.
Thanks.
-
AndreyZ
Re: TIBCScript: ExecuteStream
Glad to help. If any other questions come up, please contact us.
Re: TIBCScript: ExecuteStream
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
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
-
AndreyZ
Re: TIBCScript: ExecuteStream
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.
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
Excellent, thanks!
-
AndreyZ
Re: TIBCScript: ExecuteStream
Feel free to contact us if you have any further questions about IBDAC.