473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

database - strange behaviour of one field

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
6 1269
Show us the content of priceInfo. Copy it from Access and paste it inhere
Jul 22 '05 #2
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Bob Bedford | last post by:
I've no access to mysql NG, so I ask here. I've a strange behaviour with mysql. when I do a select from a simple table, then I get a result for a certain field when I then put a "union" and...
4
by: Wayne Aprato | last post by:
I have a simple database which was originally written in Access 97. When converted to Access 2000 file format it ran flawlessly in Access 2002. I've just tried to run it in Access 2003 and I am...
0
by: john | last post by:
Rich Text Box in Access form Hello: For example i have to tables in access: PERSON and ADDRESS in a one to many relation. And now i want to have a main PERSON form with a subform ADDRESS on it....
1
by: shellino | last post by:
Hi! I have an odd problem. When in frmOrderDetails, which is a sub form on frmOrders, I try to make a new orderline, the following occurs: The first field, ItemID (a combobox), is being...
2
by: David | last post by:
I have mentioned this issue previously but as yet have not found a solution. In VB.Net 2003, I have 4 Listviews on a Tab. Each listview has the data source property set to point to a database...
2
by: Keith Wilby | last post by:
I have a table containing different field types including a memo field. If I do a select distinct on the table the memo field is truncated to 256 characters. I've never encountered this before,...
8
by: Dox33 | last post by:
I ran into a very strange behaviour of raw_input(). I hope somebody can tell me how to fix this. (Or is this a problem in the python source?) I will explain the problem by using 3 examples....
0
by: David | last post by:
Hi list. I have a few database-related questions. These aren't Python-specific questions, but some of my apps which use (or will use) these tables are in Python :-) Let me know if I should ask...
2
by: Roman | last post by:
Hi, I have small problem. What is wrong within this script ? It works on my PC (IE6, IE7, FF) but doesn't work on other PCs with the same configuration ? Any idea ? function...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.