help with this script please.

Results 1 to 2 of 2

Thread: help with this script please.

  1. #1
    Join Date
    Dec 1969

    Default help with this script please.

    is this part of the script correct.<BR><BR>if rs("check") = "" then <BR><BR>basicly i have a checkbox in my access database if the box is not checked/nothing in it the script does a <BR><BR>Response.Write"no permission" <BR><BR>if their is someithing in their then it does<BR><BR><BR>Else<BR>%&#062;<BR>&#060;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&#062; html............<BR><BR>&#060;%<BR>ID = trim(request.querystring("id"))<BR><BR>sql="SELECT * FROM users WHERE UNID = "& ID &""<BR> <BR> set db=Server.CreateObject("ADODB.Connection") <BR> db.Open"hatcher" <BR> set rs=Server.CreateObject("ADODB.RECORDSET") <BR> rs.Open sql, db, 3, 3 <BR><BR>if rs("check") = "" then <BR>Response.Write"no permission"<BR>Else<BR>%&#062;<BR>&#060;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&#062;<BR><BR>html code.........<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Nope...

    A "checkbox" in an Access database is *ACTUALLY* a BOOLEAN data field. That is, it *actually* simply has a True/False value.<BR><BR>So if the field "check" shows up in Access as a checkbox, then when you do this:<BR> if rs("check") = "" then <BR>it will *NEVER* be "". Never.<BR><BR>To use a boolean field you can do:<BR> If rs("check") = False Then<BR>or, of course,<BR> If rs("check") = True Then<BR><BR>And do note that<BR> If rs("check") Then<BR>is 100% the same as<BR> If rs("check") = True Then<BR><BR><BR><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