Please Help! Going insane with TQuery!

Hello,

I really don't understand what's going on here and hope that someone can help
me.

I'm trying to write a very simple demo program that will do SQL queries on a
group of paradox tables I created with the DBD (I'm using Delphi 1.0).

The queries are of the form:

SELECT  D.DAMT FROM CINFO C, DINFO D
             WHERE C.ACCTNO = D.ACCTNO AND
             C.PIN = :pin

So I've written the queries in the SQL part of the Query box, as above.

So in the code, I do a

1) Query1.Close;
2) Query2.Close;

3) Query1.ParamByName('PIN').AsString := InputPin;
4) Query2.ParamByName('PIN').AsString := InputPin;

5) Query1.Open;
6) Query2.Open;

And it works. The first time. The _second_ time it executes, I
invariably get a EGPF at 4). It's becoming very frustrating. Is there
some other step that has to be done to 're-use' a query?

I really don't understand this. Is there something really big and obvious
that I'm missing? I'm obviously not an expert here.

Thanks very much!
Scott