Results 1 to 6 of 6

Thread: Return

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Ok:

    I am returning some values from a query. I then take those values and place them in a table. The problem is that when onep of those values is not returned it will not return the entire row. How do I allow some to be blank (cells)?

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    put an if statement to see if the value is = "" and if it is just stick a space or maybe a dash in the cell instead of the value from the database. ie

    If rs("myfield") = "" then
    response.write "<td>" & "-" & "</td>"
    else
    response.write "<td>" & rs("myfield") & "</td>"
    end if



    does that help?
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    It definitely helps but I think that my problem is in the query. I am not that great at SQL. I am pullin records from a few diff tables but am nnot using any join statements, would this be the problem?

  4. #4
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    no its the HTML stuff. I have had the same problem before.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    I did this:


    <% if objRs("Buddy") = "" then
    response.write "<td width=70>" & "-" & "</td>"
    else
    response.write "<td width=70>" & objRs("Buddy") & "</td>"
    end if
    %>

    It diplays all of the dashes then starts the table...

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954
    Any ideas..... I am getting all of the dashes then the table starts.....

Posting Permissions

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



Click Here to Expand Forum to Full Width