473,383 Members | 1,837 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,383 software developers and data experts.

Variable from RecordSet only keeps the first word.? Huh.?

Tearing heair out here ........... and there must be a simple
solution.

The words Joe Peter Smith are stored in an Access-97 field called
Contact and are returned in a record set and stored to a variable
called ShowContact

ie. ShowContact = rstemp("Contact")

But when the variable ShowContact is displayed.

ie. <% =ShowContact %>

it conatins only Joe and not Joe Peter Smith

Any suggestions please.

TIA

.les.

o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
Les Juby le*****@anti-spam.iafrica.com
Webpro Internet - - - Prosoft Microsystems
Durban, KwaZulu-Natal, South Africa
P.O.Box 35243, Northway 4065, South Africa
Tel: +27 31 563-8344 Fax: +27 31 564-4928
o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o
(you *do* know to take "anti-spam" out the address....?
Jul 19 '05 #1
2 2112
Les Juby wrote:
Tearing heair out here ........... and there must be a simple
solution.

The words Joe Peter Smith are stored in an Access-97 field called
Contact and are returned in a record set and stored to a variable
called ShowContact

ie. ShowContact = rstemp("Contact")

But when the variable ShowContact is displayed.

ie. <% =ShowContact %>

it conatins only Joe and not Joe Peter Smith

I've never seen this behavior: are you sure there are not quotes or other
characters in that Contact field? Is Contact a Text or Memo field?

I just tried it: I can't reproduce this problem: there is something you are
inadvertantly leaving out of your description of the problem. In the
meantime, try using Replace to replace the spaces with &nbsp;

ShowContact = Replace(ShowContact, " ","&nbsp;")

Depending on where in the document you are writing this to, this may yield
unwanted results.

HTH,
Bob Barrows
Jul 19 '05 #2
> But when the variable ShowContact is displayed.

ie. <% =ShowContact %>

it conatins only Joe and not Joe Peter Smith


Sounds like this is in an input field, yes? And you have something like
this:

<input type=text name=contact value=<%=showContact%>>

Well, as any HTML manual will tell you, text values are supposed to be
enclosed in quotes, so try:

<input type="text" name="contact" value="<%=showContact%>">

Probably even safer to use:

<input type="text" name="contact"
value="<%=Server.HTMLEncode(showContact)%>">
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Adrian Parker | last post by:
Hi. I would like to query a database, given several where clauses to refine my search, and return the value of one single field in the database. eg: I have a table that lists teachers. Their...
3
by: Bryan Parkoff | last post by:
.....I try to reduce un-necessary temporal variables so it can be optimized for best performance. I try to assign only one register storage so two variables can access to only one register storage...
25
by: Lyn | last post by:
Hi, I am working on a genealogy form. The only table (so far) lists everybody in the family, one record per person. Each record has an autonum ID. The parent form (frmMainForm) displays the...
1
by: ronvhill | last post by:
I am encountering an error on the following code. Basically, I have two queries which I am using to enter new records into two other tables, one a master and the other a child. Function...
10
by: shubha.sunkada | last post by:
Hi, I have a recordset connection in asp that I am using to search records.If I use the client side cursorlocation (rs.cursorlocation=3) then it takes really long to return back the records due...
1
by: akaess | last post by:
I am trying to merge information from the the database into word documents using the following methods but it keeps giving the error 91: Object Variable or With Block Variable not set. could anybody...
2
by: akaess | last post by:
Hey everybody I am currently trying to merger data from a form in MS access but it keeps giving me the error 91: Object variable or with block variable not set. could somebody please look at the code...
2
by: Whasigga | last post by:
Hello I am working on a project to export data from a query into an Excel file. I have a form with a button on it and the button when clicked runs a function that is supposed to run the query and...
20
by: teddysnips | last post by:
Weird. I have taken over responsibility for a legacy application, Access 2k3, split FE/BE. The client has reported a problem and I'm investigating. I didn't write the application. The...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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
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...

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.