Script ExecuteStream and UseUnicode?
Posted: Mon  18 May 2015 08:59
				
				Hi,
When using ExecuteStream on the script component, what Encoding should the stream use and does it require a "preamble" if UseUnicode on the Connection is set to True?
And what about other character sets?
What Encoding does using the Execute method use when executing the script in the SQL property of the script component?
Example:
Using the stringstream works, using the file to open a UTF8 encoded file, including "preamble" fails. Using Unicode as the encoding on the string stream fails with: "
Parser: The unknown symbol ' "
Any clue? Using MyDAC 8.5.14 Delphi 2009.
With regards,
Martijn Tonies
			When using ExecuteStream on the script component, what Encoding should the stream use and does it require a "preamble" if UseUnicode on the Connection is set to True?
And what about other character sets?
What Encoding does using the Execute method use when executing the script in the SQL property of the script component?
Example:
Code: Select all
  s := TStringStream.Create(Memo1.Text, TEncoding.UTF8);
  s := TFileStream.Create('C:\Users\Martijn\Documents\Database Workbench 5 Pro\scripttest_utf8.sql', fmOpenRead);
  try
    MyScript1.ExecuteStream(s);
  finally
    s.Free;
  end;Parser: The unknown symbol ' "
Any clue? Using MyDAC 8.5.14 Delphi 2009.
With regards,
Martijn Tonies