Ask a Question related to Coldfusion Database Access, Design and Development.
-
Botman63 #1
Query does not work in MS Access in CF
I have this query that works fine in MS Access itself, but when I put it into
my CFM page it does not work. The query is this:
SELECT Products.Short_Description, Sizes.Size, Stock.StockCode,
Products.Color_Code, Products.Piece, Stock.StitchCount
FROM (Sizes INNER JOIN Products ON Sizes.Size_ID = Products.Size_ID) INNER
JOIN (Stock INNER JOIN TempCart ON Stock.StockCode = TempCart.StockCode) ON
Products.SKU = TempCart.SKU
WHERE (((TempCart.CFID)=#Session.CFID#) AND
((TempCart.CFTOKEN)=#Session.CFToken#))
The only thing that Access does is place double-quotes around the session
variables. Otherwise this query is exactly the way it is in Access. I tried it
with single quotes and no quotes (since these session variables are only
numeric variables, they should not have quotes around them anyway). Can someone
tell me what the problem is?
Thanks,
Bruce
Botman63 Guest
-
Query use to work on CF 4.5
I'm getting the following error "No value given for one or more required parameters." However this worked on CF 4.5 but not on CF 6.1. Any ideas? ... -
Query dosen't work
hi friends i have a question i make this on application.cfm <cfapplication sessionmanagement="yes" name="UniqueName" ClientManagement="No"... -
Query used to work
I have this one query it used to work in cfm 5.0 but now gives an error in cfm 6.0 <b>The query is</b> <CFQUERY NAME='ParentOrganization'... -
SQL/ASP.NET getting DATE to work in query
I'm grabbing today's date with some ASP.net code: Dim Today As Date Today = Microsoft.VisualBasic.Today() I'm then trying to run a SQL query... -
Access 2002 PDFWriter VBA Code w/WinXP does not work like Access 2000
I am trying to print an Access 2002 report (Windows XP OS) as a PDF. I had success with Access 2000 in a Windows 2000 environment, but as soon as I... -
paross1 #2
Re: Query does not work in MS Access in CF
Does it just not return what you expect ,or is it actually giving you an error message and, if so, what error are you seeing?
Phil
paross1 Guest
-
Botman63 #3
Re: Query does not work in MS Access in CF
Error:
Error Executing Database Query.
The error occurred in C:\Inetpub\wwwroot\Stitches\ShoppingCart.cfm: line 28
26 : SELECT Products.Short_Description, Sizes.Size, Stock.StockCode,
Products.Color_Code, Products.Piece, Stock.StitchCount
27 : FROM (Sizes INNER JOIN Products ON Sizes.Size_ID = Products.Size_ID)
INNER JOIN (Stock INNER JOIN TempCart ON Stock.StockCode = TempCart.StockCode)
ON Products.SKU = TempCart.SKU
28 : WHERE (((TempCart.CFID)=#Session.CFID#) AND
((TempCart.CFTOKEN)=#Session.CFToken#))
29 : </cfquery>
Botman63 Guest
-
paross1 #4
Re: Query does not work in MS Access in CF
What happens if you replace #Session.CFID# and #Session.CFToken# with constants 202 and 75117395 respectively within your cfquery?
Phil
paross1 Guest
-
James@nps #5
Re: Query does not work in MS Access in CF
New to coding but I would try this:
WHERE (((TempCart.CFID)='#Session.CFID#') AND ((TempCart.CFTOKEN)='#Session.CFToken#'))
James@nps Guest
-
paross1 #6
Re: Query does not work in MS Access in CF
He already stated in the original post that I tried it with single quotes and no quotes...
Phil
paross1 Guest
-
JMGibson3 #7
Re: Query does not work in MS Access in CF
I would suspect Size is one of those keywords that cannot pass throught the
ODBC interface (although Native Access still allows it). Either rename Size in
the database or try surrounding with brackets Sizes..
JMGibson3 Guest
-
Botman63 #8
Re: Query does not work in MS Access in CF
It was Size. Although it works fine in Access without brackets, I had to put brackets around it in CF. Thanks JM.
Botman63 Guest



Reply With Quote

