Drawbacks of UnicodeMemoParameters?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ralfiii
Posts: 25
Joined: Wed 16 Mar 2011 09:25

Drawbacks of UnicodeMemoParameters?

Post by ralfiii » Tue 19 Apr 2011 12:02

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!

AndreyZ

Post by AndreyZ » Wed 20 Apr 2011 08:33

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.

ralfiii
Posts: 25
Joined: Wed 16 Mar 2011 09:25

Post by ralfiii » Wed 20 Apr 2011 08:52

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.

Post Reply