It works for SQLServer DSN but not for ODBC SOCKET.

-----Original Message-----
From: Simon Stanlake [mailto:[EMAIL PROTECTED]] 
Sent: 03 December 2002 16:22
To: CF-Talk
Subject: RE: Shall I start Pulling my Hair


on oracle test works


        <cfquery name="test" datasource="ds">
                select name as thisisthefieldname1 from tbl_fields
                where fieldid = 12
        </cfquery>
        <cfoutput>
                #test.thisisthefieldname1#
        </cfoutput>

returns the correct value.  cfdump shows one column called
'thisisthefieldname1'.

I would check the JDBC implementation to see if alias of more than 12
characters is supported.

good luck,
simon

-----Original Message-----
From: Shahzad.Butt [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 03, 2002 8:00 AM
To: CF-Talk
Subject: RE: Shall I start Pulling my Hair


ID is varchar..

It goes to IF and gives error on DETAILFIELD1. Just make simple query
with alias of more than 10 chars and test.

-----Original Message-----
From: Randell B Adkins [mailto:[EMAIL PROTECTED]] 
Sent: 03 December 2002 15:49
To: CF-Talk
Subject: Re: Shall I start Pulling my Hair


First check to see if the field ID is a numeric or TEXT field. if it is
Numeric then the WHERE line should be:

WHERE ID = 12   not '12' 

Single Quotes are not used in numeric fields.

Then I would also change the output line to read:
<CFIF myQuery.recordcount gt 0> <cfoutput>#myQuery.Detailfield1#
<cfelse>
  NO RECORDS
</CFIF>

>>> [EMAIL PROTECTED] 12/03/02 10:23AM >>>
Whats wrong with this simple code

<CFQuery Name="myQuery" Datasource="Test">
    Select J_Sname.AccountNumber AS DetailField1
    From J_Sname
    Where ID = '12'
</CFQuery>

<CFOutput>
    #myQuery.DetailField1#
</CFOutput>

It gives error

'Element DETAILFIELD1 is undefined in myQuery. '

But if I use DETAILFIE1 (or anyother letter not more than 10
characters)
instead of DETAILFIELD1 it works. As I pop in 11th character for my
alias it gives error. Is there any limit of characters in AS inside
query in CFMX?????

Application Server: Coldfusion MX
DB: SQLServer 2000



Shahzad Butt (Development Engineer)

JJ FastFood Distribution Ltd.
Office:  +44 (0) 1992 701 722
Mobile: +44 (0) 7803 584 873
Fax:     +44 (0) 1992 701 604

7 Solar Way, Innova Park, Enfield, London, EN3 7XY


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they are
addressed. If you have received this email in error please notify the
system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com 
**********************************************************************





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to