C
Carol
I have the following queries set up in my database that were working a week
ago. Now I am getting the error "Invalid procedure call" when I try to run
any of them. I will list each of them, and paste the SQL. I will also past
the SQL from the one query that is working.
I don't understand why they worked a week ago and not now. I checked the
data in the tables to make sure that the expressions contained would return
valid results. So far I haven't seen anything that would crash the
expression.
Please take a look at these queries and let me know if you see anything.
Thanks,
Carol
Query #1 - TASK LIST. The user is queried for the section and it will
return all entries with that section. THIS QUERY IS WORKING.
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.SECTION) Like [Enter Section]) AND
((MAIN.[FREQ INTERVAL]) Is Not Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null)
AND ((MAIN.[CATEGORY INTERVAL]) Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is
Not Null))
ORDER BY MAIN.TASK, DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED
DATE]);
Query #2 - TASK LIST ALL - This is the same query as #1, but without the
section query. It will return all entries.
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.[FREQ INTERVAL]) Is Not Null) AND
((MAIN.[FREQ NUMBER]) Is Not Null) AND ((MAIN.[CATEGORY INTERVAL]) Is Not
Null) AND ((MAIN.[CATEGORY NUMBER]) Is Not Null))
ORDER BY MAIN.TASK, DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED
DATE]);
Query #3 - DATE QUERY - This will query the user for a start date, end date
and section.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.SECTION) Like [Enter Section]) AND
((DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE])) Between
[Enter Start Date] And [Enter End Date]) AND ((MAIN.[FREQ INTERVAL]) Is Not
Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null) AND ((MAIN.[CATEGORY INTERVAL])
Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is Not Null));
Query #4 - DATE QUERY ALL SECTIONS - This will query the user for a start
and end date.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST
COMPLETED DATE])) Between [Enter Start Date] And [Enter End Date]) AND
((MAIN.[FREQ INTERVAL]) Is Not Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null)
AND ((MAIN.[CATEGORY INTERVAL]) Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is
Not Null));
ago. Now I am getting the error "Invalid procedure call" when I try to run
any of them. I will list each of them, and paste the SQL. I will also past
the SQL from the one query that is working.
I don't understand why they worked a week ago and not now. I checked the
data in the tables to make sure that the expressions contained would return
valid results. So far I haven't seen anything that would crash the
expression.
Please take a look at these queries and let me know if you see anything.
Thanks,
Carol
Query #1 - TASK LIST. The user is queried for the section and it will
return all entries with that section. THIS QUERY IS WORKING.
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.SECTION) Like [Enter Section]) AND
((MAIN.[FREQ INTERVAL]) Is Not Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null)
AND ((MAIN.[CATEGORY INTERVAL]) Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is
Not Null))
ORDER BY MAIN.TASK, DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED
DATE]);
Query #2 - TASK LIST ALL - This is the same query as #1, but without the
section query. It will return all entries.
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.[FREQ INTERVAL]) Is Not Null) AND
((MAIN.[FREQ NUMBER]) Is Not Null) AND ((MAIN.[CATEGORY INTERVAL]) Is Not
Null) AND ((MAIN.[CATEGORY NUMBER]) Is Not Null))
ORDER BY MAIN.TASK, DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED
DATE]);
Query #3 - DATE QUERY - This will query the user for a start date, end date
and section.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((MAIN.SECTION) Like [Enter Section]) AND
((DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE])) Between
[Enter Start Date] And [Enter End Date]) AND ((MAIN.[FREQ INTERVAL]) Is Not
Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null) AND ((MAIN.[CATEGORY INTERVAL])
Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is Not Null));
Query #4 - DATE QUERY ALL SECTIONS - This will query the user for a start
and end date.
PARAMETERS [Enter Start Date] DateTime, [Enter End Date] DateTime;
SELECT MAIN.ID, MAIN.DEPT, MAIN.SECTION, MAIN.TASK, MAIN.[PROF MAIL DATE],
MAIN.[EST TIME (HR)], MAIN.[LAST COMPLETED DATE], DateAdd([FREQ
INTERVAL],[FREQ NUMBER],[LAST COMPLETED DATE]) AS Expr1, MAIN.[RESPONSIBLE
PARTY], MAIN.CATEGORY, MAIN.Notes, MAIN.FREQ, MAIN.[FREQ INTERVAL],
MAIN.[FREQ NUMBER], MAIN.[CATEGORY INTERVAL], MAIN.[CATEGORY NUMBER],
DateAdd([CATEGORY INTERVAL],[CATEGORY NUMBER],DateAdd([FREQ INTERVAL],[FREQ
NUMBER],[LAST COMPLETED DATE])) AS Expr2
FROM MAIN
WHERE (((MAIN.DEPT)="LAB") AND ((DateAdd([FREQ INTERVAL],[FREQ NUMBER],[LAST
COMPLETED DATE])) Between [Enter Start Date] And [Enter End Date]) AND
((MAIN.[FREQ INTERVAL]) Is Not Null) AND ((MAIN.[FREQ NUMBER]) Is Not Null)
AND ((MAIN.[CATEGORY INTERVAL]) Is Not Null) AND ((MAIN.[CATEGORY NUMBER]) Is
Not Null));