Re: MS Access SQL > ASP SQL problem....
From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 01/05/05
- Next message: Aaron [SQL Server MVP]: "Re: MS Access SQL > ASP SQL problem...."
- Previous message: Aaron [SQL Server MVP]: "Re: Extracting height and width of a SWF file"
- In reply to: david_at_scene-double.co.uk: "MS Access SQL > ASP SQL problem...."
- Next in thread: David Gordon: "Re: MS Access SQL > ASP SQL problem...."
- Reply: David Gordon: "Re: MS Access SQL > ASP SQL problem...."
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 5 Jan 2005 09:19:29 -0500
david@scene-double.co.uk wrote:
> Hi,
>
> I have the following code which returns an error
What error?
> when run as part of
> my ASP SQL....
>
> strquery = strquery & "FROM (Customers INNER JOIN Orders ON
> Customers.CustomerID = Orders.CustomerID) INNER JOIN (Products INNER
> JOIN (OrderLines INNER JOIN StockMovements ON OrderLines.JobNumber =
> StockMovements.JobNumber) ON (Products.ProductID =
> OrderLines.ProductID) AND (Products.ProductID = OrderLines.ProductID))
> ON Orders.OrderID = OrderLines.OrderID"
>
> I have copied this direct from MS Access Query SQL. How would I adapt
> this code to work in ASP ?
>
>
The only way to debug a sql statement is to know what it is. Do
Response.Write strquery
to see what your vbscript code has generated. If it is correct you should be
able to copy and paste it from the browser window into the SQL View of an
Access Query Builder and run it without modification (unless wildcards are
involved).
You would be better off executing the saved query directly instead of
dealing with all the dynamic sql nonsense:
http://groups-beta.google.com/group/microsoft.public.inetserver.asp.db/msg/7d6e8544e2fd6889?oe=UTF-8
Bob Barrows
-- Microsoft MVP -- ASP/ASP.NET Please reply to the newsgroup. The email account listed in my From header is my spam trap, so I don't check it very often. You will get a quicker response by posting to the newsgroup.
- Next message: Aaron [SQL Server MVP]: "Re: MS Access SQL > ASP SQL problem...."
- Previous message: Aaron [SQL Server MVP]: "Re: Extracting height and width of a SWF file"
- In reply to: david_at_scene-double.co.uk: "MS Access SQL > ASP SQL problem...."
- Next in thread: David Gordon: "Re: MS Access SQL > ASP SQL problem...."
- Reply: David Gordon: "Re: MS Access SQL > ASP SQL problem...."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|