change syntax

Results 1 to 2 of 2

Thread: change syntax

  1. #1
    Join Date
    Dec 1969

    Default change syntax

    I have a check box like so <BR>&#060;input type="checkbox" name="faxmachine" value="1" checked&#062;<BR><BR>when the page "Update" it gives me an error <BR>Syntax error converting the varchar value &#039;on&#039; to a column of data type bit.<BR><BR>How do I convert the value of the checkbox field from "on" to "1" I am told that even though I have set the value to "1" I have to code the page to convert the value from "on" to "1" becuase in the code at top the value="1" still acts like "on"

  2. #2
    Join Date
    Dec 1969

    Default RE: change syntax

    INSERT into bitfield VALUES(1)<BR><BR>Don&#039;t put single quotes around your 1.<BR><BR>Also, you can just do<BR><BR>If checkbox = "on" then<BR> myVar = 1<BR>else<BR> myVar = 0<BR>End If<BR><BR>and insert myVar (without quotes) into your field.

Posting Permissions

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