House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

Coldfusion MS acess question

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi All -
fun and learning
04/19/12 10:29 A
>>but fails when used inline in Coldfusion.
Claude_Schnéegans
04/19/12 10:34 A
> but fails when used inline
Leigh
04/19/12 10:34 A
>>datepart("q", datecolumn), column1, column2
Claude_Schnéegans
04/19/12 10:36 A
>>>datepart("q", datecolumn), column1, column2
fun and learning
04/19/12 10:55 A
>>Too few parameters. Expected 1
Claude_Schnéegans
04/19/12 12:34 P
>>>Too few parameters. Expected 1
fun and learning
04/19/12 01:21 P
>>>Too few parameters. Expected 1
fun and learning
04/19/12 01:22 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
fun and learning
04/19/2012 10:29 AM

Hi All - I am have a strange problem with a query which works directly on MS Access but fails when used inline in Coldfusion. I am using        SELECT             datepart("q", datecolumn), column1, column2        FROM            table When I remove the datepart in coldfusion, it works fine. Any idea why this could he happening?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
04/19/2012 10:34 AM

>>but fails when used inline in Coldfusion. Please define "fails". - No record returned? - wrong data? - error thrown?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
04/19/2012 10:34 AM

> but fails when used inline   Can you elaborate on "fails"?  Is the cfquery is throwing an error? If so post the full error message

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
04/19/2012 10:36 AM

>>datepart("q", datecolumn), column1, column2 It might be that the query has no name for the datepart column. Try datepart("q", datecolumn) AS quarter, column1, column2

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
fun and learning
04/19/2012 10:55 AM

>>>datepart("q", datecolumn), column1, column2 > >It might be that the query has no name for the datepart column. >Try > >datepart("q", datecolumn) AS quarter, column1, column2 The error says Too few parameters. Expected 1. I did use an alias for the column, but it does not help

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Leigh
04/19/2012 11:01 AM

Did you verify the column name is correct? Any difference if you use single quotes instead of double?         ie  datePart( 'q' , theColumnName

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Robert Harrison
04/19/2012 11:51 AM

>datepart("q", datecolumn) AS quarter, column1, column2 Did you verify the datecolumn is a properly defined as a date field in the data base and does not have 'null' values? Robert B. Harrison Director of Interactive Services Austin & Williams 125 Kennedy Drive, Suite 100 Hauppauge NY 11788 P : 631.231.6600 Ext. 119 F : 631.434.7022 http://www.austin-williams.com Great advertising can't be either/or.  It must be &. Plug in to our blog: A&W Unplugged http://www.austin-williams.com/unplugged

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Claude_Schnéegans
04/19/2012 12:34 PM

>>Too few parameters. Expected 1 This is supposed to mean that one of le column names is not found in the table. Why don't you post the whole query here?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
fun and learning
04/19/2012 01:21 PM

>>>Too few parameters. Expected 1 > >This is supposed to mean that one of le column names is not found in the table. >Why don't you post the whole query here?

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
fun and learning
04/19/2012 01:22 PM

>>>Too few parameters. Expected 1 > >This is supposed to mean that one of le column names is not found in the table. >Why don't you post the whole query here? The query works fine in MS Access, but creating problems in ColdFusion. Instead I have decided to use ColdFusion quarter function to achieve the same result. Thanks for the answers


<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 21, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference