You are logged in as Anonymous.

184890 members

March 01, 2006

Curious Coldfusion George. I need to make my database of PDF's available online.

I am new to this Coldfusion thing. I have a list of titles. When you click on a title, it takes you to a page of citations associated with that title. At the top of this page, I want a link to the PDF of this title but I do not know how. I have the PDF's embedded in an Access file and I am working with Coldfusion to make dynamic pages. I have been trying to find examples online but I don't seem to know the pagic words as I am finding bupkiss.

the only advice i can give is don't trust fleischmann and pons.

Your Access database has to be set up as a datasource.

Assuming your Access database has the titles and filenames of the PDFs, here's how to do the query:

<cfquery name="getTitles" datasource="ACCESSFILE">
SELECT Title,Filename
FROM ACCESSTABLE
</cfquery>

Here's how to display the filenames in a list:

[ul]
<cfoutput query="getTitles">
[li][a href="#Filename#"]#Title#[/a][/li]
</cfoutput>
[/ul]

Here's how to display the filenames in a table:

[table]
<cfoutput query="getTitles">
[tr][td][a href="#Filename#"]#Title#[/a][/td][/tr]
</cfoutput>
[/table]


Change the Access filename and field names to match your database, and change [] to <>.

« Older *hack* | Curious 30-something George Newer »



To post comments to a thread you must login or create a profile.