Page 1 of 1

Drawbacks of UnicodeMemoParameters?

Posted: Tue 19 Apr 2011 12:02
by ralfiii
Hello!

I am converting an entire app from Delphi2007/IBX to Delphi2010/IBDac.
From time to time I ran into problems when I wanted to write unicode-Memos.

A solution was code like this:

Code: Select all

  qryEval.ParamByName('foo').AsMemoRef.IsUniCode:=True;
  qryEval.ParamByName('foo').AsMemo:=Content;
Alternative - I read - I can set the global variable UnicodeMemoParameters
to true. What's the drawback of this solution? (or, what's the consequence. I didn't find docu on that parameter)

Thanks!

Posted: Wed 20 Apr 2011 08:33
by AndreyZ
Hello,

The only thing the UnicodeMemoParameters global variable does is setting the IsUnicode property of the memo parameter to True internally. But we recommend you to use the IsUnicode property instead of the UnicodeMemoParameters global variable, because if UnicodeMemoParameters is set to True, you won't be able to work with non-unicode memo parameters.
In the next IBDAC build we will change the behaviour of working with memo parameters: when IBCConnection.Options.UseUnicode is set to True, and field has the BLOB SUB_TYPE 1 type, IBDAC will automatically set the IsUnicode property of the memo parameter to True.

Posted: Wed 20 Apr 2011 08:52
by ralfiii
AndreyZ wrote:In the next IBDAC build we will change the behaviour of working with memo parameters: when IBCConnection.Options.UseUnicode is set to True, and field has the BLOB SUB_TYPE 1 type, IBDAC will automatically set the IsUnicode property of the memo parameter to True.
Sounds great!
Thanks.