database - strange behaviour of one field

Discussion in 'ASP General' started by btopenworld, Feb 10, 2005.

  1. btopenworld

    btopenworld Guest

    I have an access database with lots of fields including a memo field called
    'priecinfo'.

    Everything works well, lots of data is written, but in one particular
    situation, I can't get the field 'priceinfo' to write out:

    1) the code below works properly except that the field 'priceinfo' doesn't
    get written - replace it with any other field and it works.

    If Recordset1("priceinfo") <> "" Then

    Response.Write("<tr><td colspan='2' class='subhead'>PRICE AND BOOKING
    INFORMATION</td></tr> <tr>")
    Response.Write("<td colspan='2' class='subcont'><p class='pricing'>")
    Response.Write (Recordset1("priceinfo")) '
    (this line doesn't execute - the rest does)
    Response.Write("</p></td> </tr>")

    End If

    Where there is information, the html gets written, but the record doesn't so
    the 'If Then' statement is testing the record properly.



    2) Write it like this and it does work this does work

    <tr><td colspan='2' class='subhead'>PRICE AND BOOKING INFORMATION</td></tr>
    <tr><td colspan='2' class='subcont'><p class='pricing'>
    <% Response.Write (Recordset1("priceinfo")) %>
    </p></td></tr>

    3) Put the If Then back in and it doesn't work again

    <tr><td colspan='2' class='subhead'>PRICE AND BOOKING INFORMATION</td></tr>
    <tr><td colspan='2' class='subcont'><p class='pricing'>
    <%
    If Recordset1("priceinfo") <> "" Then
    Response.Write (Recordset1("priceinfo"))
    End If
    %>
    </p></td></tr>

    I can get round it but I am intregued to know if anyone can shed light on
    this.

    TIA

    John
    btopenworld, Feb 10, 2005
    #1
    1. Advertising

  2. Show us the content of priceInfo. Copy it from Access and paste it inhere
    Gérard Leclercq, Feb 10, 2005
    #2
    1. Advertising

  3. btopenworld

    btopenworld Guest

    here is some of the data

    Thanks for you interest - here are a few samples copied as suggested:
    1)
    2 Occupants £200/week
    4 Occupants £250/week
    50% reduction for 3 months rental

    2)
    From £150 to £475 per week

    3)
    Please let us send you a brochure, or visit our website.

    4)
    Please check our website or contact us for the latest price list and
    availablity.

    We ask for a deposit of 30% at the time of booking with the balance payable
    one month before the start of the holiday.

    5)
    From £101 per week and £66 Friday to Monday for two persons

    Thanks
    John


    "Gérard Leclercq" <> wrote in message
    news:I_DOd.7993$-ops.be...
    > Show us the content of priceInfo. Copy it from Access and paste it inhere
    >
    >
    btopenworld, Feb 10, 2005
    #3
  4. Re: here is some of the data

    Yes, but which text give you the error. Please repair the database first and
    retry

    "btopenworld" <> schreef in bericht
    news:cuf5ik$1ad$...
    > Thanks for you interest - here are a few samples copied as suggested:
    > 1)
    > 2 Occupants £200/week
    > 4 Occupants £250/week
    > 50% reduction for 3 months rental
    >
    > 2)
    > From £150 to £475 per week
    >
    > 3)
    > Please let us send you a brochure, or visit our website.
    >
    > 4)
    > Please check our website or contact us for the latest price list and
    > availablity.
    >
    > We ask for a deposit of 30% at the time of booking with the balance
    > payable
    > one month before the start of the holiday.
    >
    > 5)
    > From £101 per week and £66 Friday to Monday for two persons
    >
    > Thanks
    > John
    >
    >
    > "Gérard Leclercq" <> wrote in message
    > news:I_DOd.7993$-ops.be...
    >> Show us the content of priceInfo. Copy it from Access and paste it inhere
    >>
    >>

    >
    >
    Gérard Leclercq, Feb 10, 2005
    #4
  5. btopenworld

    Mark Schupp Guest

    This is an old old problem with memo fields.

    Put the data into a variable first.

    strPriceInfo = Recordset1("priceinfo")

    > If strPriceInfo <> "" Then
    >
    > Response.Write("<tr><td colspan='2' class='subhead'>PRICE AND BOOKING
    > INFORMATION</td></tr> <tr>")
    > Response.Write("<td colspan='2' class='subcont'><p class='pricing'>")
    > Response.Write (strPriceInfo ) '



    --
    Mark Schupp
    Head of Development
    Integrity eLearning
    www.ielearning.com


    "btopenworld" <> wrote in message
    news:cueb7a$q2e$...
    > I have an access database with lots of fields including a memo field

    called
    > 'priecinfo'.
    >
    > Everything works well, lots of data is written, but in one particular
    > situation, I can't get the field 'priceinfo' to write out:
    >
    > 1) the code below works properly except that the field 'priceinfo' doesn't
    > get written - replace it with any other field and it works.
    >
    > If Recordset1("priceinfo") <> "" Then
    >
    > Response.Write("<tr><td colspan='2' class='subhead'>PRICE AND BOOKING
    > INFORMATION</td></tr> <tr>")
    > Response.Write("<td colspan='2' class='subcont'><p class='pricing'>")
    > Response.Write (Recordset1("priceinfo")) '
    > (this line doesn't execute - the rest does)
    > Response.Write("</p></td> </tr>")
    >
    > End If
    >
    > Where there is information, the html gets written, but the record doesn't

    so
    > the 'If Then' statement is testing the record properly.
    >
    >
    >
    > 2) Write it like this and it does work this does work
    >
    > <tr><td colspan='2' class='subhead'>PRICE AND BOOKING

    INFORMATION</td></tr>
    > <tr><td colspan='2' class='subcont'><p class='pricing'>
    > <% Response.Write (Recordset1("priceinfo")) %>
    > </p></td></tr>
    >
    > 3) Put the If Then back in and it doesn't work again
    >
    > <tr><td colspan='2' class='subhead'>PRICE AND BOOKING

    INFORMATION</td></tr>
    > <tr><td colspan='2' class='subcont'><p class='pricing'>
    > <%
    > If Recordset1("priceinfo") <> "" Then
    > Response.Write (Recordset1("priceinfo"))
    > End If
    > %>
    > </p></td></tr>
    >
    > I can get round it but I am intregued to know if anyone can shed light on
    > this.
    >
    > TIA
    >
    > John
    >
    >
    >
    >
    >
    Mark Schupp, Feb 10, 2005
    #5
  6. btopenworld

    btopenworld Guest

    Re: here is some of the data

    Every record (I tried a couple of dozen) behaved the same way - both before
    and after I compacted/repaired the database. Very strange. Any further
    ideas??
    regards
    John



    "Gérard Leclercq" <> wrote in message
    news:usHOd.8108$-ops.be...
    > Yes, but which text give you the error. Please repair the database first

    and
    > retry
    >
    > "btopenworld" <> schreef in bericht
    > news:cuf5ik$1ad$...
    > > Thanks for you interest - here are a few samples copied as suggested:
    > > 1)
    > > 2 Occupants £200/week
    > > 4 Occupants £250/week
    > > 50% reduction for 3 months rental
    > >
    > > 2)
    > > From £150 to £475 per week
    > >
    > > 3)
    > > Please let us send you a brochure, or visit our website.
    > >
    > > 4)
    > > Please check our website or contact us for the latest price list and
    > > availablity.
    > >
    > > We ask for a deposit of 30% at the time of booking with the balance
    > > payable
    > > one month before the start of the holiday.
    > >
    > > 5)
    > > From £101 per week and £66 Friday to Monday for two persons
    > >
    > > Thanks
    > > John
    > >
    > >
    > > "Gérard Leclercq" <> wrote in message
    > > news:I_DOd.7993$-ops.be...
    > >> Show us the content of priceInfo. Copy it from Access and paste it

    inhere
    > >>
    > >>

    > >
    > >

    >
    >
    btopenworld, Feb 10, 2005
    #6
  7. btopenworld

    btopenworld Guest

    Thanks - I'll try that. regards John


    "Mark Schupp" <> wrote in message
    news:eF$...
    > This is an old old problem with memo fields.
    >
    > Put the data into a variable first.
    >
    > strPriceInfo = Recordset1("priceinfo")
    >
    > > If strPriceInfo <> "" Then
    > >
    > > Response.Write("<tr><td colspan='2' class='subhead'>PRICE AND BOOKING
    > > INFORMATION</td></tr> <tr>")
    > > Response.Write("<td colspan='2' class='subcont'><p class='pricing'>")
    > > Response.Write (strPriceInfo ) '

    >
    >
    > --
    > Mark Schupp
    > Head of Development
    > Integrity eLearning
    > www.ielearning.com
    >
    >
    > "btopenworld" <> wrote in message
    > news:cueb7a$q2e$...
    > > I have an access database with lots of fields including a memo field

    > called
    > > 'priecinfo'.
    > >
    > > Everything works well, lots of data is written, but in one particular
    > > situation, I can't get the field 'priceinfo' to write out:
    > >
    > > 1) the code below works properly except that the field 'priceinfo'

    doesn't
    > > get written - replace it with any other field and it works.
    > >
    > > If Recordset1("priceinfo") <> "" Then
    > >
    > > Response.Write("<tr><td colspan='2' class='subhead'>PRICE AND BOOKING
    > > INFORMATION</td></tr> <tr>")
    > > Response.Write("<td colspan='2' class='subcont'><p class='pricing'>")
    > > Response.Write (Recordset1("priceinfo"))

    '
    > > (this line doesn't execute - the rest does)
    > > Response.Write("</p></td> </tr>")
    > >
    > > End If
    > >
    > > Where there is information, the html gets written, but the record

    doesn't
    > so
    > > the 'If Then' statement is testing the record properly.
    > >
    > >
    > >
    > > 2) Write it like this and it does work this does work
    > >
    > > <tr><td colspan='2' class='subhead'>PRICE AND BOOKING

    > INFORMATION</td></tr>
    > > <tr><td colspan='2' class='subcont'><p class='pricing'>
    > > <% Response.Write (Recordset1("priceinfo")) %>
    > > </p></td></tr>
    > >
    > > 3) Put the If Then back in and it doesn't work again
    > >
    > > <tr><td colspan='2' class='subhead'>PRICE AND BOOKING

    > INFORMATION</td></tr>
    > > <tr><td colspan='2' class='subcont'><p class='pricing'>
    > > <%
    > > If Recordset1("priceinfo") <> "" Then
    > > Response.Write (Recordset1("priceinfo"))
    > > End If
    > > %>
    > > </p></td></tr>
    > >
    > > I can get round it but I am intregued to know if anyone can shed light

    on
    > > this.
    > >
    > > TIA
    > >
    > > John
    > >
    > >
    > >
    > >
    > >

    >
    >
    btopenworld, Feb 10, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page