> When I retrieve the field from the DB I get 
> "True" or "False" ...

Not quite, probably.  It's when you DISPLAY the retrieved value that you see "True" or 
"False".  I.e. when you display a Boolean on the screen it is converted to a string 
for display.  Internally in ASP it's a Boolean value.

When you want to set it into the database it's given in the SQL without the quotes.  I 
always put it in lower case, but this is probably not important to SQL or Access ... 
i.e.:

VIPValue = true

I've never tried giving it a yes or no instead.  It might work, but would certainly 
tie you to Access unnecessarily.

Dave S

  ----- Original Message ----- 
  From: Mad�rick 
  To: [EMAIL PROTECTED] 
  Sent: Saturday, May 15, 2004 9:08 AM
  Subject: Re: [ASP] Updating a Boolean column in an Access DB from ASP


  There are a couple answers here , can someone give me an example.  
  When I retrieve the field from the DB I get "True" or "False so I 
  assumed to change it I would use "True" & "False". 

  To set the the value as:

  VIPValue = "True" 

  Are you saying here, I should set the value as;

  VIPValue = True         (without the quotes)

  Madorick

  --- In [EMAIL PROTECTED], "Chris Hagwood" 
  <[EMAIL PROTECTED]> wrote:
  > I use TRUE and FALSE in Access.
  > 
  > ----- Original Message ----- 
  > From: "Powderhill, Daniel" <[EMAIL PROTECTED]>
  > To: <[EMAIL PROTECTED]>
  > Sent: Friday, May 14, 2004 4:56 AM
  > Subject: RE: [ASP] Updating a Boolean column in an Access DB from 
  ASP
  > 
  > 
  > IIRC aren't booleans represented as "Yes/No" fields in Access? So 
  try using
  > Yes or No... not sure whether you need quotes or not, I would guess 
  not, but
  > I'm not an Access person, so could well be wrong.
  > 
  > Dan
  > Visit www.diado.com for free ASP.Classic classes, articles, links &
  > downloads.
  > Looking for a new domain for your ASP website? I have 
  ASPfunctions.net and
  > .com for sale for a reasonable offer - email me for more info!
  > 
  > 
  > -----Original Message-----
  > From: Adrian Forbes - ITD [mailto:[EMAIL PROTECTED]
  > Sent: 14 May 2004 09:54
  > To: [EMAIL PROTECTED]
  > Subject: RE: [ASP] Updating a Boolean column in an Access DB from 
  ASP
  > 
  > 
  > You're better off using -1 for true and 0 for false when using SQL
  > statements.
  > 
  > -----Original Message-----
  > From: Mad�rick [mailto:[EMAIL PROTECTED]
  > Sent: 14 May 2004 5:22
  > To: [EMAIL PROTECTED]
  > Subject: [ASP] Updating a Boolean column in an Access DB from ASP
  > 
  > 
  > I have an Access database containing a Column defined
  > as "True/False", a Boolean, I need to be able to update this column.
  > How can I force the Data type in the SQL to update the column?  This
  > is running Server-Side.
  > 
  > I have tried:
  > *******************************************************
  > strSQL = "UPDATE [GROUP] SET VIP = " & Cbool(VIPValue) & " Where 
  Name = '" &
  > strEnteredName & "'"
  > 
  > Set recordset = connection.Execute (strSQL)
  > ********************************************************
  > 
  > also
  > 
  > ********************************************************
  > strSQL = "UPDATE [GROUP] SET VIP = " & VIPValue & " Where Name = '" 
  &
  > strEnteredName & "'"
  > 
  > Set recordset = connection.Execute (strSQL)
  > ********************************************************
  > 
  > VIPValue I have tried setting to ("TRUE" and "FALSE") or ("on"
  > and "off")
  > 
  > I use the exact same code in other places to update string
  > information in a different column with no problem.  I do have the
  > recordset available at this point in the code.
  > 
  > Madorick
  > 
  > Work like you don't need to
  > Love like you've never been hurt
  > Dance like no body is watching
  > 
  > 
  > 
  > --------------------------------------------------------------------
  - 
  >  Home       : http://groups.yahoo.com/group/active-server-pages
  > --------------------------------------------------------------------
  -
  >  Post       : [EMAIL PROTECTED]
  >  Subscribe  : [EMAIL PROTECTED]
  >  Unsubscribe: [EMAIL PROTECTED]
  > --------------------------------------------------------------------
  - 
  > Yahoo! Groups Links
  > 
  > 
  > 
  > 
  > 
  > 
  > The contents of this email and any attachments are sent for the 
  personal
  > attention
  > of the addressee(s) only and may be confidential.  If you are not 
  the
  > intended
  > addressee, any use, disclosure or copying of this email and any 
  attachments
  > is
  > unauthorised - please notify the sender by return and delete the 
  message.
  > Any
  > representations or commitments expressed in this email are subject 
  to
  > contract.
  > 
  > ntl Group Limited
  > 
  > 
  > 
  > --------------------------------------------------------------------
  - 
  >  Home       : http://groups.yahoo.com/group/active-server-pages
  > --------------------------------------------------------------------
  -
  >  Post       : [EMAIL PROTECTED]
  >  Subscribe  : [EMAIL PROTECTED]
  >  Unsubscribe: [EMAIL PROTECTED]
  > --------------------------------------------------------------------
  - 
  > Yahoo! Groups Links
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > --------------------------------------------------------------------
  - 
  >  Home       : http://groups.yahoo.com/group/active-server-pages
  > --------------------------------------------------------------------
  -
  >  Post       : [EMAIL PROTECTED]
  >  Subscribe  : [EMAIL PROTECTED]
  >  Unsubscribe: [EMAIL PROTECTED]
  > --------------------------------------------------------------------
  - 
  > Yahoo! Groups Links



  ---------------------------------------------------------------------    
  Home       : http://groups.yahoo.com/group/active-server-pages
  ---------------------------------------------------------------------
  Post       : [EMAIL PROTECTED]
  Subscribe  : [EMAIL PROTECTED]
  Unsubscribe: [EMAIL PROTECTED]
  --------------------------------------------------------------------- 



------------------------------------------------------------------------------
  Yahoo! Groups Links

    a.. To visit your group on the web, go to:
    http://groups.yahoo.com/group/active-server-pages/
      
    b.. To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]
      
    c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/17folB/TM
---------------------------------------------------------------------~->

---------------------------------------------------------------------    
 Home       : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
 Post       : [EMAIL PROTECTED]
 Subscribe  : [EMAIL PROTECTED]
 Unsubscribe: [EMAIL PROTECTED]
--------------------------------------------------------------------- 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/active-server-pages/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to