By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,938 Members | 1,967 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,938 IT Pros & Developers. It's quick & easy.

database - strange behaviour of one field

P: n/a
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

Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Show us the content of priceInfo. Copy it from Access and paste it inhere
Jul 22 '05 #2

P: n/a
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" <ge*************@pas-de-mail.fr> wrote in message
news:I_*******************@phobos.telenet-ops.be...
Show us the content of priceInfo. Copy it from Access and paste it inhere

Jul 22 '05 #3

P: n/a
Yes, but which text give you the error. Please repair the database first and
retry

"btopenworld" <jo**@siteweave.net> schreef in bericht
news:cu**********@sparta.btinternet.com...
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" <ge*************@pas-de-mail.fr> wrote in message
news:I_*******************@phobos.telenet-ops.be...
Show us the content of priceInfo. Copy it from Access and paste it inhere


Jul 22 '05 #4

P: n/a
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" <jo**@siteweave.net> wrote in message
news:cu**********@titan.btinternet.com... 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


Jul 22 '05 #5

P: n/a
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" <ge*************@pas-de-mail.fr> wrote in message
news:us*******************@phobos.telenet-ops.be...
Yes, but which text give you the error. Please repair the database first and retry

"btopenworld" <jo**@siteweave.net> schreef in bericht
news:cu**********@sparta.btinternet.com...
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" <ge*************@pas-de-mail.fr> wrote in message
news:I_*******************@phobos.telenet-ops.be...
Show us the content of priceInfo. Copy it from Access and paste it inhere



Jul 22 '05 #6

P: n/a
Thanks - I'll try that. regards John
"Mark Schupp" <no****@nospam.com> wrote in message
news:eF**************@TK2MSFTNGP14.phx.gbl...
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" <jo**@siteweave.net> wrote in message
news:cu**********@titan.btinternet.com...
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



Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.