Added text field to database. New entries not equal to "" ???

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default Added text field to database. New entries not equal to "" ???

    Hi!

    I'm accessing an MS Access database from an ASP server.

    I just added a new text column (field) to one of my tables. I have not added
    any data to this new field in any of the rows.

    I read the field in and compare it to "" and it's coming up as false.

    How do identify the empty fields?

    'ASP code - Never produces "Blank"
    if rsSet("region") = "" then response.write "Blank" else response.write
    rsSet("region")


    Noozer Guest

  2. Similar Questions and Discussions

    1. dynamic text field & "paging" content
      I have a dynamic text field that gets populated from the backend with free form text (can be any text really). I want to be able to populate the...
    2. align "right" the text inside a text field?
      hi: this is the code i've used: <STYLE type="text/css"> <!-- ..totalField { font-weight: bold; text-align: right; }
    3. Multi-field database "order by"
      Is it possible to retrieve data with ASP sorted on 2 fields? I've tried : SELECT * FROM ORDER By Field1 AND Field 2 But it gives an error....
    4. Compare 2 fields & delete everything in "field 2" that occurs in "field 1"
      Is it possible to compare 2 fields and delete everything in "field 2" that also occurs in "field 1" ? FIELD1 800-555-1212 for...
    5. dr("field").toString returns "400.0000" instead of "400"
      I have just installed VS.NET 2003 on my computer. I have a project that I have been developing on VS.NET 2002. I haven't upgraded this project to...
  3. #2

    Default Re: Added text field to database. New entries not equal to "" ???

    Try

    If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
    rsSet("region")

    Alan

    "Noozer" <dont.spam@me.here> wrote in message
    news:IVmAc.755870$Pk3.730376@pd7tw1no...
    > Hi!
    >
    > I'm accessing an MS Access database from an ASP server.
    >
    > I just added a new text column (field) to one of my tables. I have not
    added
    > any data to this new field in any of the rows.
    >
    > I read the field in and compare it to "" and it's coming up as false.
    >
    > How do identify the empty fields?
    >
    > 'ASP code - Never produces "Blank"
    > if rsSet("region") = "" then response.write "Blank" else response.write
    > rsSet("region")
    >
    >

    Alan Howard Guest

  4. #3

    Default Re: Added text field to database. New entries not equal to "" ???

    Thanks!

    "Alan Howard" <Xalan.howardX@Xparadise.net.nzX> wrote in message
    news:ONCUTnKVEHA.2928@tk2msftngp13.phx.gbl...
    > Try
    >
    > If IsNull (rsSet("region")) Then Response.Write "Null" Else Response.Write
    > rsSet("region")
    >
    > Alan
    >
    > "Noozer" <dont.spam@me.here> wrote in message
    > news:IVmAc.755870$Pk3.730376@pd7tw1no...
    > > Hi!
    > >
    > > I'm accessing an MS Access database from an ASP server.
    > >
    > > I just added a new text column (field) to one of my tables. I have not
    > added
    > > any data to this new field in any of the rows.
    > >
    > > I read the field in and compare it to "" and it's coming up as false.
    > >
    > > How do identify the empty fields?
    > >
    > > 'ASP code - Never produces "Blank"
    > > if rsSet("region") = "" then response.write "Blank" else response.write
    > > rsSet("region")
    > >
    > >
    >
    >

    Noozer Guest

  5. #4

    Default Re: Added text field to database. New entries not equal to "" ???

    And there are sometimes occasions when it could be a Null, or it could be a
    blank. If you want to check for both at once, use:

    If Len(rsSet("region") & "") = 0 Then Response.Write "Nothing" Else
    Response.Write rsSet("region")

    --
    Doug Steele, Microsoft Access MVP
    [url]http://I.Am/DougSteele[/url]
    (no e-mails, please!)


    "Noozer" <dont.spam@me.here> wrote in message
    news:4MnAc.791748$oR5.380643@pd7tw3no...
    > Thanks!
    >
    > "Alan Howard" <Xalan.howardX@Xparadise.net.nzX> wrote in message
    > news:ONCUTnKVEHA.2928@tk2msftngp13.phx.gbl...
    > > Try
    > >
    > > If IsNull (rsSet("region")) Then Response.Write "Null" Else
    Response.Write
    > > rsSet("region")
    > >
    > > Alan
    > >
    > > "Noozer" <dont.spam@me.here> wrote in message
    > > news:IVmAc.755870$Pk3.730376@pd7tw1no...
    > > > Hi!
    > > >
    > > > I'm accessing an MS Access database from an ASP server.
    > > >
    > > > I just added a new text column (field) to one of my tables. I have not
    > > added
    > > > any data to this new field in any of the rows.
    > > >
    > > > I read the field in and compare it to "" and it's coming up as false.
    > > >
    > > > How do identify the empty fields?
    > > >
    > > > 'ASP code - Never produces "Blank"
    > > > if rsSet("region") = "" then response.write "Blank" else
    response.write
    > > > rsSet("region")
    > > >
    > > >
    > >
    > >
    >
    >

    Douglas J. Steele Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139