Re: Problem with bit field using MS Sql server and Turbo Delphi 2006



There is no Boolean type in MS SQL. Try this:

ThisValid : int;

if (something) <> 0) then
ThisValid := 1
else
ThisValid := 0;

Parameters.ParamByName('@gps_validity').Value := ThisValid;


Andy Stephenson wrote:

ThisValid : boolean;

if (something) <> 0) then
ThisValid := true
else
ThisValid := false;

Parameters.ParamByName('@gps_validity').Value := ThisValid;
.