• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF8 and ACCESS 2007 and cfoutput

Contributor ,
Mar 21, 2011 Mar 21, 2011

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.

TOPICS
Advanced techniques

Views

755

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Mar 21, 2011 Mar 21, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2011 Mar 21, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 21, 2011 Mar 21, 2011

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2011 Mar 21, 2011

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2011 Mar 21, 2011

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/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 21, 2011 Mar 21, 2011

Copy link to clipboard

Copied

LATEST

Good, I understand, I think that's why.

Many Thanks.

Pierre.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation