Matthew Stanfield wrote:
>>> Usually, i'll use "enum('0','1')" in place of a boolean type.
>>>
>>> Curtis
>>>
>>>
>>
>> For JDBC stuff, I've found that if you really want to call this a
>> shortcoming, then that's about as far as you can take it
>> - the MySQL JDBC driver makes the BIT field act just like a
>> single-bit field.
>>
>> Regards,
>>
>> Chris
>>
>
> Sure -- but I did say it was only 'slightly annoying'.
>
>> TINYINT(1) which works fine but is slightly annoying because
>
> > of the extra type conversion needed every time you use it.
>
> It just means with an ODBC programming library that, say, a method
> GetBoolean does not work and you need to do say...
>
> int i = odbcReader.GetInt(index);
> bool b = i > 0 ? true : false;
>
> every time instead of:
>
> bool b = odbcReader.GetBoolean(index);
>
> It's just tedious, that's all.
>
> Regards,
>
> ..matthew
>
>
True, but this isn't too massive an issue either if you think about it -
ODBC is closely tied to everyone's favourite programming language,
Prolog...err...
I mean Haskell...errr...I mean LISP. :-) Of course, I actually mean C. C
has very few primitive types, so delegating "true" boolean fields to a
low priority
makes a little bit of sense.
As you have said, only slightly annoying but perhaps much less annoying
than my posts! :-)
Regards,
Chris