Using Queries in Version 20

Frequently asked questions - and answers!
Post Reply
User avatar
jovivier
Site Admin
Posts: 778
Joined: Thu Mar 12, 2009 2:57 pm
Company: LVL
City / Town: Blenheim
Location: Lincoln, New Zealand
Contact:

Using Queries in Version 20

Post by jovivier »

Version 20 has a new Database Editor, using ADO instead of DAO, which uses a slightly different SQL syntax.
Therefore double quotes cause a message "Too few parameters. Expected 1" message.

To fix:-
1. Load your required query.
2. This example is based on the "Show Wholesale and Retail Prices of SUP1 Pipes" which is:-
SELECT Components.Description, Components.Reals7 AS Wholesale, Components.Reals8 AS Retail FROM Components WHERE (((Components.[Supplier Code])="SUP1") AND ((Components.[Database Number])=1))
3. Locate the double quotes (around SUP1) and replace these with single quotes.
4. When the query is now :-
SELECT Components.Description, Components.Reals7 AS Wholesale, Components.Reals8 AS Retail FROM Components WHERE (((Components.[Supplier Code])='SUP1') AND ((Components.[Database Number])=1))
select Save Query and give it new name.
5. Now Execute Query.

The IRRICAD Team
Post Reply