Copy link to clipboard
Copied
I installed the required ODBC driver for Access 2007 on CF8. Fine.
I declare a new DATASOURCE if CF (socket ODBC) fine
I write a CF file with a simple query (select) , the cfouput
Almost fine,
except that : the displayed data is encountered by the # (like the called variable)
Here the code :
<cfoutput>
<cfquery name="liste_ad" datasource="test_r4">
select * from Descriptif_vehicules
</cfquery>
<cfloop query="liste_ad">
#source_disponibilite#<br>
</cfloop>
</cfoutput>
here is the Display : (a single record in the base)
#http://www.avto.net/_AVTO/ad.asp?ID=4418041&show=1#
It has to be :
http://www.avto.net/_AVTO/ad.asp?ID=4418041&show=1
which is the data in the Access (.accdb file) DB
How to get reed of the 2 x # ???
Thanks for any help ?
Pierre.
Copy link to clipboard
Copied
If you're asking how to display a hash character (#) inside a CFOUTPUT, just double it up - ie in your code put "##" - that'll display the symbol.
Copy link to clipboard
Copied
No, I tried this, I retrieve the name of the field. not the data.
The problem, is that the value returned is surrounded by these 2 #.
Which nobody want.
This is only since I upgrade to Access 2007.
I will try on another field.
Thanks for contribution.
Pierre.
Copy link to clipboard
Copied
What do you get if you CFDUMP liste_ad?
It looks to me liek those extra pound-signs are in your data. If they shouldn't be there: get rid. CF's just doing what it's been told to.
--
Adam
Copy link to clipboard
Copied
You may be right, CFDUMP gives same result.
But I tried on other fields, and I do not have these problems.
May be, the # are not seen in the Access display table for that field.
May be there because it is an Internet adress, which means something to do for Access ?
I may need to look at Access 2007 fields formats/functions
Thanks again.
Pierre.
Copy link to clipboard
Copied
If you're using the hyperlink data type for your field, I believe this is the default behavior. You could either rewrite the output using CF functions, or change the field data type to a regular character data type.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Copy link to clipboard
Copied
Good, I understand, I think that's why.
Many Thanks.
Pierre.