GLORP and Booleans in MS Access

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

GLORP and Booleans in MS Access

Postby jtuchel » Thu Dec 02, 2010 7:52 am

Hi

it seems the version of GLORP shipped with VAST 8.0.2 does not handle Booleans correctly for MS Access. I haven't checked for later versions on VASTGooedies.

Since the DatabasePlatform saves Booleans as either 0 (false) or 1 (true), there is a very simple fix for this:

Simply implement:
AccessPlatform>>#convertDBBooleanToBoolean:for:

Code: Select all
convertDBBooleanToBoolean: aBoolean for: aType

   "It seems GlorpBooleanType saves false as 0 and true as 1 in MS Access"
   ^(aBoolean ~= 0)


I am not sure if this is the best possible solution, but it works for me. Not sure if that should be handled by the GlorpBooleanType... Looking at the way values are converted from/to Boolean for SQL Server, it is very likely this fix should be implemented in SQLServerPlatform...

Joachim
jtuchel
[|]
 
Posts: 245
Joined: Fri Oct 05, 2007 1:05 am
Location: Ludwigsburg, Germany

Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron