Click to See Complete Forum and Search --> : problem with retrieving data from database


tuanyong
09-11-2003, 11:00 PM
i have a form which selects information to be displayed inside a browser and i hope that the email address retrieved can be set as a link so that user can click on it and send email to that person directly ...
this is part of the codes :

strSQL = "SELECT * FROM " & sBrand & " WHERE " & _
"date = '" & sDate & "'"

rsMain.Open strSQL, adoCon

if not rsMain.EOF then
Do
if (isnull(rsMain("freeTimeFrom")) and isnull(rsMain("freeTimeTo"))) or (rsMain("freeTimeFrom") = "" and rsMain("freeTimeTo") = "") then
response.write ("Engineer Assigned: ")
response.write rsMain("engineer") & "<p>"
response.write ("Extension No: ")
response.write rsMain("ext_num") & "<p>"
response.write ("Contact No: ")
response.write rsMain("tel_num") & "<p>"
response.write ("Reference No: ")
response.write rsMain("ref_no") & "<p>"
response.write ("Email Address: ")
response.write rsMain("email") & "<p>"

magus
09-11-2003, 11:14 PM
try this code:
response.write ("Email Address: ")
response.write "<a href=mailto:" & rsMain("email") & "</a><p>"

tuanyong
09-11-2003, 11:54 PM
tried using that but the email address address doesnt appear, only an underscore can be seen ...
any ideas why is it like that ?

thanks for your help

magus
09-12-2003, 12:02 AM
I'm sorry, forgot the close tag:
try this code:
response.write ("Email Address: ")
response.write ("<a href=mailto:" & rsMain("email") & ">" & rsMain("email") & "</a><p>")
hope it will success...

tuanyong
09-12-2003, 12:07 AM
thanks pal..
it works perfectly, this problem has been bugging me for quite some time .. tried modifying every possible ways but i still cant find the problem behind it ..

Cheers