SQL anomalies with variables

I

Ian

I've managed to get the counters working in Access in FP2003 and it returns
the correct values from an Access DB. If I change the values on the HAVE
statement to read: HAVING (((record.COST)>::small:: And
(record.COST)<=::large::));, (I've even tried placing ' ' around the
variables). If I change the small and large parameters to values as below
it works.

Code that works:

SELECT Count(record.GNAME) AS CountOfGNAME, Sum(record.COST) AS SumOfCOST
FROM record
HAVING (((record.COST)>20 And (record.COST)<=50));

Error:

Your page contains a query with user input parameters that could not be
resolved.
This could happen if your DatabaseRegionStart webbot has an empty or missing
s-columnnames or s-columntypes attributes.

I have another SQL statement on the page that utilises the small and large
values which are passed through from another page with no problems.

The following code is used in another region on the same page and works
fine:

SELECT record.GNAME, record.TITLE, record.FORMAT, record.SIZE,
record.RNUMBER, record.DATE, record.COST, record.RELEASED_O,
Format(cost,'£#,###.00') as newcost
FROM record
WHERE (((record.COST)>'::small::' And (record.COST)<='::large::'))
ORDER BY record.COST;

Any ideas?

Ian
 

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