Solved

GetColumnNames() is returning all uppercase names

Posted on 2003-10-30
5
448 Views
Last Modified: 2013-12-24
I am using the GetColumnNames() method in a CFML program to acquire the field names of a table.  I am then using these field names to build an INSERT command for a Microsoft SQL 7.0 database.  The GetColumnNames method is returning the field names in all uppercase letters.  Because SQL 7.0 is case sensitive, I am receiving error messages for invalid column names.  Is there a way to either:

1. Return the field names with their actual case (field names have both upper and lower case letters)
2. Tell SQL Server to ignore case of field names.

Thanks for any help.
0
Comment
Question by:jsprenk55
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 17

Assisted Solution

by:anandkp
anandkp earned 100 total points
ID: 9655574
using "query_name.ColumnList "
Returns a comma-delimited list of the query columns.

U'll get all column names formatted in uppercase & also sorted in ascending order !
I dont think theres a way to bypass this !
I wonder abt GetColumnNames() method .. where did u get this from ?

let me know

K'Rgds
Anand
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 9658873
usually when you query a DB in CF, column names are not case sensitive so using getcolumnnames() should not cause any problems.  Have you had problems with it?

CJ
0
 
LVL 17

Assisted Solution

by:anandkp
anandkp earned 100 total points
ID: 9662034
Exactly - thats with FLASH ...

U wrote "GetColumnNames() method in a CFML program" :

so i thought u had written a CFM file !
My Apologies for misunderstanding !
0
 
LVL 2

Accepted Solution

by:
jonnygo55 earned 100 total points
ID: 9696809
well in your sql statement
you could do something like to have SQL ignore case...

select * from tblColumnNames
where lower(ColumnName) = #lcase(ColumnNametoCompare)#

lcase is cold fusion not sure if that is equivilent in Flash....
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question