Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

diplaying a URL in CF from an Access DB 1

Status
Not open for further replies.

elektra12

Technical User
Jan 7, 2003
8
US
this must be a common problem, but I the solution i've used in the past is now not working. i'm trying to display a url from a db created in Access 2000. For ages, the following code has worked, but now in the past few weeks, I get an error message on my site, along these lines...

"Complex object types cannot be converted to simple values." and so on...

I guess my webhost changed the version of CF server or something, but now I've tried many things to get rid of the age old "#" from URLs in Access, but nothing works. Now I've had to modify the page, to where I atleast get the web link to show up, but still with the #s around it. Here's the code that used to work but for some reason doesn't work now.

<!--- Locate the web address - it's surrounded by &quot;#&quot; ---> <cfset stURL = REFind('##(.)*##', HoaURL, 1, true)>
<!--- Get the URL and remove the &quot;#&quot; so we can display it --->
<cfset URL = Mid(HoaURL, stURL.pos[1] + 1, stURL.len[1] - 2>
<a href=&quot;#URL#&quot; target=&quot;_blank&quot;>#URL#</a><br>


 
I think this is probably down to the name you have assigned to the variable. As URL is a structure in Coldfusion, when you say #URL# CF thinks you are trying to output the structure(complex value) as a string(Simple Value)

try changing the name of the variable to something other than URL.

Hope this helps!

Tony
 
yep, it worked. Thanks. funny that it wasn't a problem before, but now i know!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top