DefaultExpression of booleanfields

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tonisanta
Posts: 55
Joined: Wed 04 Apr 2007 17:25

DefaultExpression of booleanfields

Post by tonisanta » Fri 23 May 2008 09:41

Setting the DefaultExpression of bit-fields to 'True' raizes an error since SDAC version 4.35.1.16, it must be set to '1'; with previous SDAC it worked with 'True', too.
with regards, Toni

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 23 May 2008 12:03

Quote the True constant assigning it to DefaultExpression:

Code: Select all

MSQuery.FieldByName('c_bit').DefaultExpression := '''True''';

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 23 May 2008 12:47

You can return the behavior of previous SDAC by changing value of the DefaultExpressionOldBehavior variable to True somewhere in your program. This variable is declared in the MemDS unit.

Post Reply