Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.

Public Report
Report From: Delphi-BCB/Database/DBExpress    [ Add a report in this area ]  
Report #:  103563   Status: Closed
Wrong implementation for TDBXBooleanValue.SetAsString..
Project:  Delphi Build #:  16.0.4358.45540
Version:    16.3 Submitted By:   Tugrul HELVACI
Report Type:  Crash / Data loss / Total failure Date Reported:  2/21/2012 12:26:04 AM
Severity:    Serious / Highly visible problem Last Updated: 9/5/2012 7:59:06 PM
Platform:    All platforms Internal Tracking #:   290053
Resolution: Fixed (Resolution Comments) Resolved in Build: : 17.0.4625.53395
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
Related to Report# 103458

TDBXBooleanValue.SetAsString method declared in Data.DBXCommon.pas line 11832.

procedure TDBXBooleanValue.SetAsString(const Value : UnicodeString);
begin
  SetBoolean(Value <> 'False');
end;

As you can see, above method checks Value differs "False". But when i send a "false" or "FALSE" or something smilar to this function ?
For example, if i call this method using DBXBooleanValue.SetAsString('false') or DBXBooleanValue.SetAsString('FALSE') method will run unexpectedly..!

So, correct method decleration must be;

procedure TDBXBooleanValue.SetAsString(const Value : UnicodeString);
begin
  SetBoolean(UpperCase(Value) <> 'FALSE');
end;
Steps to Reproduce:
None
Workarounds
None
Attachment
None
Comments

None

Server Response from: ETNACODE01