Null Values in Access through ASP

Results 1 to 2 of 2

Thread: Null Values in Access through ASP

  1. #1
    Join Date
    Dec 1969

    Default Null Values in Access through ASP

    Ok, I am trying to populate a select box with values froma a DB, pretty simple. But I want my criteria to only display when the "answer" column is empty. My code is below, I am getting no errors, just a blank select box...Any help would be greatly appreaciated! Thanks! Oh, and the last two fields are Memo Fields...<BR><BR>&#060;select name="ctlID" &#062;<BR>&#060;%<BR>Dim oRS<BR>Dim sSql<BR>Dim vAnswer<BR>Dim vQuestion<BR><BR>Set oRS=server.CreateObject("ADODB.recordset")<BR><BR> sSql = "SELECT question.ID,question.answer,question.question FROM Question " <BR> <BR> oRS.Open sSql,conn<BR> oRS.MoveFirst<BR> <BR> Do while not oRS.EOF<BR> If IsNull(oRS("answer")) then<BR> Response.Write "&#060;option value=" & oRS.Fields("ID") & "&#062;"<BR> Response.Write oRs.Fields("question") & "&#060;/option&#062;" & vbCrLf<BR> oRS.movenext <BR> End If<BR> loop<BR> <BR> <BR>%&#062;<BR>&#060;/select&#062;

  2. #2
    jusitn Guest

    Default RE: Null Values in Access through ASP

    i&#039;ve never had much luck w/ isnull() so i use len()<BR>like<BR><BR>if (len(someStr) = 0) then<BR>&#039; its empty<BR>else<BR>&#039; theres stuff in there<BR>end if

Posting Permissions

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