inserting a bit into mssql database

From: Date: Wed, 02 May 2001 11:25:56 +0000
Subject: inserting a bit into mssql database
Groups: php.windows 
Request: Send a blank email to php-windows+get-7206@lists.php.net to get a copy of this message
Hi, I am trying to insert into a column in a mssql 7 database with a datatype of "bit"... I have tried to insert 0, 1, '0', '1' but get an sql error every time ("Incorrect syntax near ...")... I also tried first using settype and setting my variables type to boolean (which seems to me to be the nearest to 'bit' from the available choices) but this gave the same sql error... Has anyone managed to do an insert like this? Are there any tricks I should be aware of? TIA, Kelvin.

« previous php.windows (#7206) next »