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

Problem with extracting a url from MS SQL Server & displaying it

Guest
Aug 23, 2010 Aug 23, 2010

I've got this really weird error - We store a link to our terms and conditions pdf file in our database which we then display on the bottom of our invoices which are also PDF's - The link either doesn't display or if it does display - It truncates the link

The code is as follows

<cfquery name="companyDetails">

select TermsAndConditions from companyDetails

where company = <companyName>

</cfquery>

Then I display it as follows:

<cfdocument format="pdf"
                        margintop="0.2"
                        marginbottom="1"
                        marginleft="0.9"
                        filename="#documentName#"
                        overwrite="yes">
                        <cfif isDefined("companyDetails.TermsAndConditions")>
                            <cfdocumentitem type= "footer">
                                  <cfoutput>                               
                                        <div align="center" style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px;">
                                            <strong>Terms and Conditions: #companyDetails.TermsAndConditions#</strong>
                                        </div>                               
                                </cfoutput>
                            </cfdocumentitem>
                        </cfif>

     <cfoutput >  ......</cfoutput>

</cfdocument>

The contents of the TermsAndConditions field in the DB looks like this: www.<sitename>.co.uk/default/assets/File/Terms.pdf - We are using MS SQL Server - Any help would be most appreciated - It's currently hard-coded which is a pain because we produce invoices for 2 companies and therefore need to pick up the correct value as they are different

TOPICS
Database access
397
Translate
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 ,
Aug 23, 2010 Aug 23, 2010
LATEST

Start with the basics.  If you cfdump your query, does it give you what you expect to see?

Are you sure it even runs?  Your where clause does not look like valid sql.

Translate
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