Database Results Wizard Error

J

John Parker

I have joined 3 tables to show combined information and using the custom SQL
feature in Wizard, everything works okay until I try to filter a certain
field (in this example Manuf)

I have tested the SQL in the origial database using a query (which is where
I got the code) and it works fine, but as soon as I use it online I get the
following error:
=============

Database Results Wizard Error
The operation failed. If this continues, please contact your server
administrator.

=============

Everything works okay until I add the WHERE info:


SELECT Manufacturers.Manuf, Models.Model, Lamps.Lamp_Desc,
Lamps.Lamp_MSRP_Cdn, Lamps.Lamp_SP_Cdn
FROM Manufacturers INNER JOIN (Lamps INNER JOIN Models ON Lamps.Lamp_ID =
Models.Lamp_Desc) ON (Manufacturers.Manuf_ID = Lamps.Manuf) AND
(Manufacturers.Manuf_ID = Models.Manuf)
WHERE (((Manufacturers.Manuf)="Hitachi"));


Hope this makes sense..

John Parker
 
I

Ian

I had to add a comma at the end of my select statement, without this I was
getting simular errors! Also check where you place the WHERE statement and
the format WHERE ((Manufacturers.Manuf)="Hitachi");

Failing that check out the following site it was recommended by another
poster and has lots of very useful info.

http://www.spiderwebwoman.com/resources/

Hope this helps.

Ian
 
J

John Parker

Thanks Ian, you have been very helpful, however when I add a comma I get an
error..

I did however figure how to get more from the error message and now get:

===================

Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers

===================
 
J

John Parker

For future reference....

It was corrected when I changed:

WHERE (((Manufacturers.Manuf)="Hitachi"));

to:

WHERE (Manufacturers.Manuf='Hitachi');

John P.


John Parker said:
Thanks Ian, you have been very helpful, however when I add a comma I get an
error..

I did however figure how to get more from the error message and now get:

===================

Database Results Wizard Error
Description: [Microsoft][ODBC Microsoft Access Driver] Too few parameters.
Expected 1.
Number: -2147217904 (0x80040E10)
Source: Microsoft OLE DB Provider for ODBC Drivers

===================



Ian said:
I had to add a comma at the end of my select statement, without this I was
getting simular errors! Also check where you place the WHERE statement and
the format WHERE ((Manufacturers.Manuf)="Hitachi");

Failing that check out the following site it was recommended by another
poster and has lots of very useful info.

http://www.spiderwebwoman.com/resources/

Hope this helps.

Ian

custom
SQL get
the
Lamps.Lamp_ID
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top