Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 97 Pass-Through ODBC error

Status
Not open for further replies.

L0stAngel

Programmer
May 5, 2005
58
US
Hello, I have the following Passthrough querie that works fine:

SELECT pub.sbs."Item-code", pub.sbs."Tool-code", pub.sbs."Station", pub.sbs."Date-run", pub.sbs."Run-hours", pub.sbs."Mfg-qty-base", pub.sbs."Rej-qty-base", pub.sbs."Batch", pub.sbs."Shell", pub.iix."Class-code", pub.iix."Group-code", pub.iix."Customer"
FROM pub.sbs, pub.iix
WHERE (pub.iix."customer" = '5' OR pub.iix."customer" = '5A' OR pub.iix."customer" = '5B' OR pub.iix."customer" = '5C') AND
pub.sbs."Item-code" = pub.iix."Item-code" AND
pub.sbs."Run-hours">0 AND
pub.sbs."Mfg-qty-base">0 AND
(((pub.sbs."Date-run") >= '01/01/2006' And (pub.sbs."Date-run") <= '01/31/2006') AND
((pub.sbs."Station")<>'REWORK') AND ((pub.sbs."Item-code") <> '') AND ((pub.sbs."Order-seq") <> '') AND
((pub.sbs."Tool-code") <> '') AND ((pub.sbs."Station") <> ''))


I want to change it, that instead of having the Date-Run dates coded into the query, that when the query is ran it asks you...so I changed the lines that read:
(((pub.sbs."Date-run") >= '01/01/2006' AND (pub.sbs."Date-run") <= '01/31/2006') AND

to

(((pub.sbs."Date-run") >= [Enter start date] And (pub.sbs."Date-run") <= [Enter end date]) AND

When I run the query, it gives me this error:
ODBC--call failed.
[DataDirect-Technologies][ODBC PROGRESS driver][PROGRESS]Syntax error (7587) (#-20003)

Does anyone know whats up? I have done querys like this before and they work...

 
I don't think you may use parameters in a Passthrough query, period.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top