When a True data type is passed in from ASP, the resultant SQL command will
look like this :
INSERT INTO tableName (fieldName) VALUES (True);
Not this :
INSERT INTO tableName (fieldName) VALUES ('True');

So produces an error as the value is not enclosed in quotes, which it would
need to be for an ENUM data type?

Russ Davies

----- Original Message -----
From: "Vivek Khera" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 9:09 PM
Subject: Re: Boolean Datatype


> >>>>> "RD" == Russ Davies <[EMAIL PROTECTED]> writes:
>
> RD> Thanks for the suggestion, but this would still mean converting the
data
> RD> type from within ASP (the 'True' type) down to a char ('T') would it
not?
>
> then use
>
>  ENUM('False','True')
>
> instead.  Enum can have any string you want.  I personally prefer to
> use the order False, True since then it also has the numeric values 0
> and 1.
>
> >> CREATE TABLE logInfo2
> >> (
> >> logID           INT NOT NULL UNIQUE,
> >> ipAddress       VARCHAR(20) NOT NULL DEFAULT 'None',
> >> boolVars        ENUM ('T', 'F') DEFAULT 'F'
> >> )
>
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to