Solved

GetColumnNames() is returning all uppercase names

Posted on 2003-10-30
5
401 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
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
 

Author Comment

by:jsprenk55
ID: 9657339
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

746 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now