RE: MS Access SQL Problem

2002-09-11 Thread Andy Ousterhout

Seamus:

Thanks.  Single quotes did the trick.  I'm getting too old for late night
programming!

Andy

-Original Message-
From: Seamus Campbell [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:18 PM
To: CF-Talk
Subject: Re: MS Access SQL Problem


I think

change Theme to 'Theme'

seamus

At 12:43 pm 11/09/2002 , you wrote:
Arg.The SQL works fine in ACCESS, but when I copy to CF5.0, I get an
error.  Any thoughts???

cfquery name=qryGetGroups datasource=#strDSN# dbtype=ODBC
 SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc
 FROM (GroupTypeCodes INNER JOIN ItemGroups ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK) INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK = GroupedItems.ItemGroup_PK
 WHERE (((GroupTypeCodes.GroupTypeName)=Theme))
 ORDER BY (ItemGroups.strItemGroupName)
/cfquery

Results in

DETAIL -
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Hint: The cause of this error is usually that your query contains a
reference to a field which does not exist. You should verify that the
fields
included in your query exist and that you have specified their names
correctly.

SQL = SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc FROM (GroupTypeCodes INNER JOIN ItemGroups ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK) INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK = GroupedItems.ItemGroup_PK
WHERE (((GroupTypeCodes.GroupTypeName)=Theme)) ORDER BY
(ItemGroups.strItemGroupName)

Data Source = OMGV2


ERRORCODE -
07001
EXTENDEDINFO -
MESSAGE -
ODBC Error Code = 07001 (Wrong number of parameters)

NATIVEERRORCODE -
-3010
SQLSTATE -
07001





__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: MS Access SQL Problem

2002-09-10 Thread Seamus Campbell

I think

change Theme to 'Theme'

seamus

At 12:43 pm 11/09/2002 , you wrote:
Arg.The SQL works fine in ACCESS, but when I copy to CF5.0, I get an
error.  Any thoughts???

cfquery name=qryGetGroups datasource=#strDSN# dbtype=ODBC
 SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc
 FROM (GroupTypeCodes INNER JOIN ItemGroups ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK) INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK = GroupedItems.ItemGroup_PK
 WHERE (((GroupTypeCodes.GroupTypeName)=Theme))
 ORDER BY (ItemGroups.strItemGroupName)
/cfquery

Results in

DETAIL -
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
Hint: The cause of this error is usually that your query contains a
reference to a field which does not exist. You should verify that the fields
included in your query exist and that you have specified their names
correctly.

SQL = SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc FROM (GroupTypeCodes INNER JOIN ItemGroups ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK) INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK = GroupedItems.ItemGroup_PK
WHERE (((GroupTypeCodes.GroupTypeName)=Theme)) ORDER BY
(ItemGroups.strItemGroupName)

Data Source = OMGV2


ERRORCODE -
07001
EXTENDEDINFO -
MESSAGE -
ODBC Error Code = 07001 (Wrong number of parameters)

NATIVEERRORCODE -
-3010
SQLSTATE -
07001




__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: MS Access SQL Problem

2002-09-10 Thread Jim Vosika

If Seamus' idea didn't work, should DISTINCTROW just be DISTINCT? 

Jim
-Original Message-
From: Seamus Campbell [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, September 10, 2002 10:18 PM
To: CF-Talk
Subject: Re: MS Access SQL Problem

I think

change Theme to 'Theme'

seamus

At 12:43 pm 11/09/2002 , you wrote:
Arg.The SQL works fine in ACCESS, but when I copy to CF5.0, I get
an
error.  Any thoughts???

cfquery name=qryGetGroups datasource=#strDSN# dbtype=ODBC
 SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc
 FROM (GroupTypeCodes INNER JOIN ItemGroups ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK)
INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK =
GroupedItems.ItemGroup_PK
 WHERE (((GroupTypeCodes.GroupTypeName)=Theme))
 ORDER BY (ItemGroups.strItemGroupName)
/cfquery

Results in

DETAIL -
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
Hint: The cause of this error is usually that your query contains a
reference to a field which does not exist. You should verify that the
fields
included in your query exist and that you have specified their names
correctly.

SQL = SELECT DISTINCTROW ItemGroups.strItemGroupName,
ItemGroups.strItemGroupDesc FROM (GroupTypeCodes INNER JOIN ItemGroups
ON
GroupTypeCodes.GroupTypeCodes_PK = ItemGroups.intGroupTypeCodes_PK)
INNER
JOIN GroupedItems ON ItemGroups.intItemGroup_PK =
GroupedItems.ItemGroup_PK
WHERE (((GroupTypeCodes.GroupTypeName)=Theme)) ORDER BY
(ItemGroups.strItemGroupName)

Data Source = OMGV2


ERRORCODE -
07001
EXTENDEDINFO -
MESSAGE -
ODBC Error Code = 07001 (Wrong number of parameters)

NATIVEERRORCODE -
-3010
SQLSTATE -
07001




http://powerdvd.tv

__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists