?
Solved

Problem displaying data retrieved from database.

Posted on 2003-04-01
3
Medium Priority
?
237 Views
Last Modified: 2011-10-03
i have the following code that loops round until eof and displays records from a database:
the code works ok, but is put in to try and highlight my problem.

<%

tog = 1
exe = "SELECT Customers.first_name, Customers.last_name, Customers.phone, Customers.email, Reservations.arrive_date, Reservations.depart_date, Reservations.confirmed, Rooms.room_name, Customers.customer_id "
exe = exe & "FROM Reservations, Customers, Rooms "
exe = exe & "WHERE Customers.customer_id = Reservations.customer_id "
exe = exe & "AND Reservations.room_id = Rooms.room_id "
exe = exe & "ORDER BY Reservations.arrive_date"
Set RS1 = Conn.Execute(exe)
do while Not RS1.EOF
     if tog = 1 then
          bgcolor = "white"
          tog = 0
     else
          bgcolor = "#eeeeee"
          tog = 1
     end if
     %>
     

     <tr bgcolor="<%= bgcolor %>">
     
     <td width="10">
    <INPUT Type=CheckBox Name="customer_id" Value="<% = RS1("customer_id")%>">
     </td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <a href=mailto:<%=RS1("email")%>><%=RS1("first_name")%></a>
     </font>&nbsp;</td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("last_name") %>
     </font>&nbsp;</td>

     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("phone") %>
     </font>&nbsp;</td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("arrive_date") %>
     </font>&nbsp;</td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("depart_date") %>
     </font>&nbsp;</td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("room_name") %>
     </font>&nbsp;</td>
     
     <td>
     <font face="Arial" size="2" color="#000000">
     <%= RS1("confirmed") %>
     </font>&nbsp;</td>

     


<%
     RS1.MoveNext
loop
RS1.Close
Conn.Close
Set Conn = Nothing
%>



what i am trying to do is insert a hyperlink on the first_name attribute of each record so that on click it opens an email window to that records email address.
 
i have achieved this to some extent but get the following in the To box:

mick@knowles4680.freeserve.co.uk#http://mick@knowles4680.freeserve.co.uk#

what do i need to do to banish the #..# for good!
regards knolio67
0
Comment
Question by:knolio67
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
bonjour-aut earned 1000 total points
ID: 8246580
looks, like your Customers.email is a hyperlink (? or variant wich is interpreted as hyperlink) in the database

if you convert a hyperlink to string you get #www....#
maybe that your result is due to unwanted artificial intelligence

so try to ensure, that you get a string with

>>>>>>>>>    CStr(Customers.email)

could be, that you get #mick@knowles4680.freeserve.co.uk#

with a Mid$() you can get rid of the #'s
0
 
LVL 28

Expert Comment

by:TextReport
ID: 8677368
knolio67,
No comment has been added lately (68 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Award points to bonjour-aut http:#8246580

Please leave any comments here within 7 days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Thanks,

TextReport
EE Cleanup Volunteer
---------------------
If you feel that your question was not properly addressed, or that none of the comments received were appropriate answers, please post a request in Community support (with a link to this page) to refund your points. http://www.experts-exchange.com/Community_Support/
0
 

Expert Comment

by:PashaMod
ID: 8755808
Per Recommendation

PashaMod
EE Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question