Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-11

TDBLookupComboBox (dblookup.inc)

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcos Douglas

Hi,

The TDBLookupComboBox uses Field.AsString or Field.Value to access the data... but I have problems with it using Unicode. I use MSSQL and I have to convert the string data using SysToUTF8/UTF8ToSys in OnGetText/OnSetText events [1] This works in TDBGrid, but not in TDBLookupComboBox.

I'm working in a patch but I'm not finished. I have some problems... So, somebody have the same problem and already did the patch?

Marcos Douglas

[1] http://bugs.freepascal.org/view.php?id=12206

Reply by email

Marcos Douglas
to Marcos Douglas
Marcos Douglas wrote 10 lines
Hi, The TDBLookupComboBox uses Field.AsString or Field.Value to access the data... but I have problems with it using Unicode. I use MSSQL and I have to convert the string data using SysToUTF8/UTF8ToSys in OnGetText/OnSetText events [1] This works in TDBGrid, but not in TDBLookupComboBox. I'm working in a patch but I'm not finished. I have some problems... So, somebody have the same problem and already did the patch?

I forgot to say that the TDBGrid works because it uses Field.DisplayText, instead of AsString or Value.

Marcos Douglas

Reply by email

Luiz Americo Pereira Camara
to Marcos Douglas
Marcos Douglas wrote 13 lines
On Mon, Nov 28, 2011 at 10:28 AM, Marcos Douglas wrote: > Hi, > > The TDBLookupComboBox uses Field.AsString or Field.Value to access the > data... but I have problems with it using Unicode. > I use MSSQL and I have to convert the string data using > SysToUTF8/UTF8ToSys in OnGetText/OnSetText events [1] > This works in TDBGrid, but not in TDBLookupComboBox. > > I'm working in a patch but I'm not finished. I have some problems... > So, somebody have the same problem and already did the patch? I forgot to say that the TDBGrid works because it uses Field.DisplayText, instead of AsString or Value.

There's indeed a bug in DBLookup controls not showing DisplayText

Unfortunately is not as simple as replacing AsString by DisplayText because of the current method to find the list field

Please create a bug report i'll look at it

Luiz

Reply by email

Marcos Douglas
to Luiz Americo Pereira Camara
Luiz Americo Pereira Camara wrote 22 lines
On 28/11/2011 11:37, Marcos Douglas wrote: > > On Mon, Nov 28, 2011 at 10:28 AM, Marcos Douglas ?wrote: >> >> Hi, >> >> The TDBLookupComboBox uses Field.AsString or Field.Value to access the >> data... but I have problems with it using Unicode. >> I use MSSQL and I have to convert the string data using >> SysToUTF8/UTF8ToSys in OnGetText/OnSetText events [1] >> This works in TDBGrid, but not in TDBLookupComboBox. >> >> I'm working in a patch but I'm not finished. I have some problems... >> So, somebody have the same problem and already did the patch? > > I forgot to say that the TDBGrid works because it uses > Field.DisplayText, instead of AsString or Value. There's indeed a bug in DBLookup controls not showing DisplayText Unfortunately is not as simple as replacing AsString by DisplayText because of the current method to find the list field

Exactly.

Please create a bug report i'll look at it

Here http://bugs.freepascal.org/view.php?id=20768

Thanks,
Marcos Douglas

Reply by email

Marcos Douglas
to Marcos Douglas
Marcos Douglas wrote 30 lines
On Mon, Nov 28, 2011 at 12:00 PM, Luiz Americo Pereira Camara wrote: > On 28/11/2011 11:37, Marcos Douglas wrote: >> >> On Mon, Nov 28, 2011 at 10:28 AM, Marcos Douglas ?wrote: >>> >>> Hi, >>> >>> The TDBLookupComboBox uses Field.AsString or Field.Value to access the >>> data... but I have problems with it using Unicode. >>> I use MSSQL and I have to convert the string data using >>> SysToUTF8/UTF8ToSys in OnGetText/OnSetText events [1] >>> This works in TDBGrid, but not in TDBLookupComboBox. >>> >>> I'm working in a patch but I'm not finished. I have some problems... >>> So, somebody have the same problem and already did the patch? >> >> I forgot to say that the TDBGrid works because it uses >> Field.DisplayText, instead of AsString or Value. > > There's indeed a bug in DBLookup controls not showing DisplayText > > Unfortunately is not as simple as replacing AsString by DisplayText because > of the current method to find the list field Exactly. > Please create a bug report i'll look at it Here http://bugs.freepascal.org/view.php?id=20768

I added one more info (bug) there.

Marcos Douglas

Reply by email