Thanks in advance
Rae MacLeman
"webdev" <som...@microsofdt.com> wrote in message
news:109215571...@iris.uk.clara.net...
In all VB-related technologies before .NET, the behavior of booleans is like
this:
True evaluates to -1
False evaluates to 0
If you perform a test on any integer-type number like this:
Dim i As Integer
i = 10
If i Then DoStuff()
...in this context, if i is 0, it evaluates as False, and for any other
value, evaluates to True.
In SQL Server, the BIT data type is always 1 for True and 0 for False. Note
the change in sign. In "VB Classic", i'ts negative, and in SQL Server it's
unsigned.
Any time I have ever interacted with a non-MS Access database from VB, I
*always* pass the numeric value instead of 'True' or 'False'
--
Peace & happy computing,
Mike Labosh, MCSD
"(bb|[^b]{2})" -- William Shakespeare
Unfortunately, only JET SQL recognizes True (-1) and T-SQL doesn't have
True. If you use True in your SQL Strings, you will need to replace with 1.
OTOH, you may want to go through all the SQL Strings against the T-SQL
syntax as JET SQL and T-SQL are different.
--
HTH
Van T. Dinh
MVP (Access)
"webdev" <som...@microsofdt.com> wrote in message
news:109215571...@iris.uk.clara.net...
Thank you all for your advice - I think I'll avoid Access next time and go
straight to MSSQL!
Rae Macleman