bit data type

Results 1 to 2 of 2

Thread: bit data type

  1. #1
    Nev Guest

    Default bit data type

    I have a drop down list, on an update screen, in which users select yes or no. the option is preselected based on the records existing value in the database.<BR><BR>when the page loads the field is populated with the existing value but if this value is unchanged and then an attempt is made to write the data to the database (by submitting the form), then it attempts to write either &#039true&#039 or &#039false&#039 to the database which the database bit field thinks is a varchar and generates an error. Is there a work around?

  2. #2
    PJ Guest

    Default RE: bit data type

    When writing to the database you can handle it like...<BR><BR>If Request("fieldname") = "True" Then<BR>rs("fieldname") = 1<BR>Else<BR>rs("fieldname") = 0<BR>End If<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts