A thought.

I think Jeff has provided the correct solution to your
problem.

I do not consider myself an expert in SQL, but I have
been very successful at taking the complicated queries
that involve several joins from the Access generated
statements and using them on my cold fusion pages. Use
the SQL view, cut and paste the exact SQL statement
from Access and remove the ; that Access adds to the
end of its query. This helps avoid syntax errors for
me and it also tells me that my query is correct. If I
know my query is correct I can look at my CF code.
First I eliminate the extras "Where" and "Order by".
If you had eliminated your "Where" statement your
query would probably run, then you can play with
syntax from just that line. 

I hope this helps.  ---George Cusumano---


--- [EMAIL PROTECTED] wrote:
> Probably change
> )="#FORM.MomMonth#"))
> to
> )='#FORM.MomMonth#'))
> 
> Jeff Craig
> 
> 
> ----- Original Message -----
> From: "Rosa, Issac" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, November 10, 2000 8:43 PM
> Subject: OT:SQL Error in CF but not Access
> 
> 
> > I am running a query in CF against an Access 97
> database.  The query runs
> > fine directly in Access, but when I run it from
> CF, I get:
> >
> > ODBC Error Code = 07001 (Wrong number of
> parameters).
> >
> > [Microsoft][ODBC Microsoft Access Driver] Too few
> parameters. Expected 1.
> > Here's the sql:
> > SELECT DMDR_Cluster.cluster_name,
> DMDR_Market.market_name,
> > DMDR_Drop_Schedule.mailpieces
> > FROM (DMDR_Drop_Schedule left outer JOIN
> DMDR_Cluster ON
> > DMDR_Drop_Schedule.id_cluster =
> DMDR_Cluster.id_cluster) left outer JOIN
> > DMDR_Market ON DMDR_Drop_Schedule.id_market =
> DMDR_Market.id_market
> > WHERE
> (((DMDR_Drop_Schedule.month)="#FORM.MomMonth#"))
> >
> > There are 3 tables - dmdr_cluster (id_cluster,
> cluster_name)
> > dmdr_market (id_market, market_name)
> > dmdr_drop_schedule (id_drop,id_cluster, id_market,
> > mailpieces)
> >
> > Any help would be appreiciated.
> >
> > If you have any questions or concerns, please feel
> free to call me at
> > 407-514-5021.
> >
> > Thank you,
> >
> > > Issac Rosa
> > >
> > > IT - National Sales & Marketing
> > > OLAP Specialist Team Leader
> > > Ofc: 407-514-5021
> > > Cell: 407-342-0644
> > > Fax: 407-514-5988
> > > [EMAIL PROTECTED]
> > >
> >
>
--------------------------------------------------------------------------
> ----------------------
> > Archives:
>
http://www.mail-archive.com/cf-talk@houseoffusion.com/
> > Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send
> a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
> >
> 
>
------------------------------------------------------------------------------------------------
> Archives:
>
http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe:
> http://www.houseoffusion.com/index.cfm?sidebar=lists
> or send a message with 'unsubscribe' in the body to
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Thousands of Stores.  Millions of Products.  All in one Place.
http://shopping.yahoo.com/
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message 
with 'unsubscribe' in the body to [EMAIL PROTECTED]

Reply via email to