Guy,
Perhaps I'm misunderstanding, but I think I know what's wrong. I am
assuming that AssociatedHTMDoc is your column name in the database.
Shouldn't it go first in the line, like this:
WHERE AssociatedHTMDoc = 'http://www.ofah.org/#url.URL#'
If you leave the quotes off the way that you have it in your message below,
the database doesn't know what http://www.ofah.org/#url.URL# means, since
it's expecting a column name. If you do put quotes, it's like using the
following clause:
WHERE 'apples' = 'oranges'
It will always come up blank, because you can't compare apples and oranges.
[sorry ;-)]
Also, I didn't see <CFOUTPUT> tags around that line, which might mean that
you are literally sending the #url.URL# part rather than the URL portion of
the query string that you are after.
Hope this helps.
Matthieu
> -----Original Message-----
> From: Guy J. McDowell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 04, 2001 10:39 AM
> To: CF-Talk
> Subject: Syntax error (missing operator) or blank screen
>
>
> *Understated argh*
>
> Situation:
> The following code either returns an error stating syntax problems or
> missing operator
> OR a blank screen.
> It returns the former when there are no single quotes and the latter
> when I add the single quotes.
> The cfif/cfelse statement works great, and the cflocation works well
> in the case of non-.htm extensions, the problem exists somewhere in my
> query.
>
> This happens whether I use the "http://www.ofah.org/" in prefix to the
> url.URL variable
>
> Desired outcome:
> User clicks on a Verity search returned URL and if it has the .htm
> extension it is processed and returned in it's appropriate .cfm
> template.
> If the item does not have a .htm extension, the user is directed
> immediately to the Verity search returned URL.
>
> Given:
> MS Access DB
> AssociatedHTMDoc is not primary key
> url.URL does not contain the "http://www.ofah.org/" portion so I added
> it to the variable.
> Spelling is correct and the fields do exist.
>
> <cfif url.URL CONTAINS ".htm">
> <cfquery name="Convert" datasource="ofah" dbtype="ODBC">
> SELECT DocumentLocation
> FROM DocumentSearch
> WHERE 'http://www.ofah.org/#url.URL#' = 'AssociatedHTMDoc'
> </cfquery>
> <cfoutput query="Convert">
> <cflocation url="#DocumentLocation#" addtoken="No">
> </cfoutput>
> <cfelse>
> <cflocation url="../#URL#" addtoken="No">
> </cfif>
>
> Help?! If you want to see it in action
> http://www.ofah.org/SearchEngine/index.cfm
>
> Yours In Conservation,
>
> Guy J. McDowell,
> Webmaster
> The Ontario Federation of Anglers & Hunters
> E-mail: [EMAIL PROTECTED]
> Phone: (705) 748-6324 ext. 262
> www.OFAH.org
>
>
>
> Archives: http://www.mail-archive.com/[email protected]/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists