Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
Thread: Hyperlink field in MsAccess
08-24-2007, 07:34 AM #1
Hyperlink field in MsAccess
I have created a field as hyperlink in MsAccess. I put a link like http://www.yahoo.com/
however when I call it by my script "response.write rs.fields("peoplename") the output show a link surrounded by "#http://www.yahoo.com/#".
Please as I delete this character and do my script read the link as a true link?
08-24-2007, 08:50 AM #2
- Join Date
- Jun 2002
- Zwolle, The Netherlands
- Thanked 31 Times in 31 Posts
a hyperlink field in ms access is a special field. ms access has its own way of handling the content in such a field in its ui. If you want to use the same data in your asp application, you have to write your own logic to handle it correctly. As i see it, you have two options:
do not define the field in access as a hyperlink field, but as a regular character field. Extract the data and construct your own hyperlink of it:
response.write '<a href="' & theurlfromthedatabase & '">thelinktekst</>'
or leave the field in access as it is (only useful if you are using access as application to enter or alternative ui) and then you have to do some extra work to extract a correct url from the field: delete the first and last character and then do the same thing as the previous
good luckI am the luckiest man in the world
08-24-2007, 09:26 AM #3
It is exactly I needed.
08-27-2007, 11:49 AM #4
Could I please add most a question regarding this subject?
I did you said - and works fine - but, could I do this using <option select> - no function?
<option value="Link2">Go Link2</option>
where Link2 would be:
<% "<a href=" & rs.fields("war") & ">CNN News</>" "%></th>