Welcome!

Charlie Arehart

Subscribe to Charlie Arehart: eMailAlertsEmail Alerts
Get Charlie Arehart via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Article

Datasource Name Case Sensitivity

Datasource Name Case Sensitivity

It may be hard to believe, but there are times when you should pay careful attention to case (use of upper and lower case letters) when spelling the datasource name in a CFQUERY tag. Case sensitivity is a common issue in Unix environments, but there is an issue that can arise unexpectedly in Windows environments.

If you issue an updating statement (SQL INSERT, UPDATE, or Delete) or CFUPDATE/CFINSERT tag in one template and use CFLOCATION to go to another template to do a query against the same datasource to displays the record(s) you just updated, and the case of the datasource names in the two templates does not match, the updates won't be reflected on that next page's query results until it is refreshed. It's true! The record is indeed updated as expected, but for some reason the results are not depicted until the page is refreshed. (A previous version of this tip said the case must match the name of the datasource as defined in the administrator, but I've since learned that it's just a question of them matching each other on the two pages.)

In an example application, simply changing the case of the datasource name of the two templates to match each other solved the problem. Allaire has recognized the problem but has no solution as yet.

Charlie Arehart Education Director, Fig Leaf Software

More Stories By Charlie Arehart

A veteran ColdFusion developer since 1997, Charlie Arehart is a long-time contributor to the community and a recognized Adobe Community Expert. He's a certified Advanced CF Developer and Instructor for CF 4/5/6/7 and served as tech editor of CFDJ until 2003. Now an independent contractor (carehart.org) living in Alpharetta, GA, Charlie provides high-level troubleshooting/tuning assistance and training/mentoring for CF teams. He helps run the Online ColdFusion Meetup (coldfusionmeetup.com, an online CF user group), is a contributor to the CF8 WACK books by Ben Forta, and is frequently invited to speak at developer conferences and user groups worldwide.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.