TOracleQuery Exception

I am writing a web application in Delphi 7 Pro. I use the DOA TOracleQuery object called Query to log the user on -- that works fine.

Later in my code I do the following (similar to the logon query).

Query.Clear;
Query.SQL.Add(sqlstr);
Query.Execute;

I get an exception on the Query.Clear command.

If I add a Query.Close before that command -- I get the exception on that Close command.

This seems like something simple I am missing in how the Query component works? Any thoughts? OR has anyone seen behavior like this before?

Thanks,
-Lyle

------------------
Ms. J. Lyle Martin
Senior Web Developer
Integic Corporation
Chantilly, VA USA
 
I figured it out. With the web application I cannot access the TOracleQuery object directly. It is passed to another object.

Cannot do
Mainmodule.Query.Clear;

Have to do
passsedqueryobjectname.Querynewname.Clear;

Both will compile -- so it is hard to find the error.

This may make some sense to others doing cgi web development so I post my solution here. Postings that say -- I figured it out -- are not much help. So hope this helps someone else.

Best,
-Lyle

Originally posted by LyleMartin:
I am writing a web application in Delphi 7 Pro. I use the DOA TOracleQuery object called Query to log the user on -- that works fine.

Later in my code I do the following (similar to the logon query).

Query.Clear;
Query.SQL.Add(sqlstr);
Query.Execute;

I get an exception on the Query.Clear command.

If I add a Query.Close before that command -- I get the exception on that Close command.

This seems like something simple I am missing in how the Query component works? Any thoughts? OR has anyone seen behavior like this before?

Thanks,
-Lyle

 
Back
Top