Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 765143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T16:50:31+00:00 2026-05-14T16:50:31+00:00

I’ve been a CF developer for 15 years and I’ve never run into anything

  • 0

I’ve been a CF developer for 15 years and I’ve never run into anything this strange or frustrating. I’ve pulled my hair out for hours, googled, abstracted, simplified, prayed and done it all in reverse. Can you help me?

A cffunction takes one string argument and from that string I build an array of “phrases” to run a query with, attempting to match a location name in my database. For example, the string “the republic of boulder” would produce the array: [“the”,”republic”,”of”,”boulder”,”the republic”,”the republic of”,”the republic of boulder”,”republic of”,”republic of boulder”,”of boulder”].

Another cffunction uses the aforementioned cffunction and runs a cfquery. A query based on the previously given example would be…

select locationid, locationname, locationaliasname from vwLocationsWithAlias where LocationName in (‘the’,’the republic’,’the republic of’,’republic’,’republic of’,’republic of boulder’,’of’,’of boulder’,’boulder’) or LocationAliasName in (‘the’,’the republic’,’the republic of’,’republic’,’republic of’,’republic of boulder’,’of’,’of boulder’,’boulder’)

This returns 2 records…

locationid – locationname – locationalias

99 – ‘Boulder’ – ‘the republic’

68 – ‘Boulder’ – NULL

This is good. Works fine and dandy. HOWEVER… if the string is changed to “the republic”, resulting in the phrases array [“the”,”republic”,”the republic”] which is then used to produce the query…

select locationid, locationname, locationaliasname from vwLocationsWithAlias where LocationName in (‘the’,’the republic’,’republic’) or LocationAliasName in (‘the’,’the republic’,’republic’)

This returns 0 records. Say what?! OK, just to make sure I’m not involuntarily HIGH I run that very same query in my SQL console against the same database in the cf datasource. 1 RECORD!

locationid – locationname – locationalias

99 – ‘Boulder’ – ‘the republic’

I can even hard-code that sql within the same cffunction and get that one result, but never from the dynamically generated SQL. I can get my location phrases from another cffunction of a different name that returns hard-coded array values and those work, but never if the array is dynamically built. I’ve tried removing cfqueryparams, triple-checking my datatypes, datasource setups, etc., etc., etc. NO DICE

WTF!? Is this an obscure bug? Am I losing my mind? I’ve tried everything I can think of and others (including Ray Camden) can think of.

ColdFusion 8 (with all the latest hotfixes)
SQL Server 2005 (with all the greatest service packs)
Windows 2003 Server (with all the latest updates, service packs and nightly MS voodoo)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T16:50:32+00:00Added an answer on May 14, 2026 at 4:50 pm

    It seems to me that your function generates a slightly different query than what you are expecting, try to put a breakpoint in your function after generating the query, copy the generated query and run it in sql server. I expect no results will be found also.

    May be some spaces or something resulting in no records found. Notes: You are searching for exact strings. To search for near strings use like in your queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 389k
  • Answers 389k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In your case, .votes is not returning an Array, it's… May 15, 2026 at 12:47 am
  • Editorial Team
    Editorial Team added an answer Because the Session reset works, and the user's identity doesn't,… May 15, 2026 at 12:47 am
  • Editorial Team
    Editorial Team added an answer There is nothing special about null characters in strings std::istringstream… May 15, 2026 at 12:47 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.