View Full Version : Hyperlink field in MsAccess
08-24-2007, 07:34 AM
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
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 luck :thumbsup:
08-24-2007, 09:26 AM
It is exactly I needed.
08-27-2007, 11:49 AM
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>
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.