Here is my question in the short version:
1) How do you get a TQuery to accept type bool and act on it and
2) what is the correct means of setting up an Update Query
Here are the details if you care to see what I've already tried:
I have a functioning DB application where I use TQuery to Sort Ascending or Descending. I can edit and apply an SQL string on the fly to also Filter on any field
value. I can turn either the filter or the sort on or off with no adverse reactions.
Basicly everything works great.
Here's the problem. I want to Filter the table on a boolian field (true/false).
I can't get SQL to recognize Boolian values, I always get a blank filter.
Next, I want to pass 2 params to the Query; aid, :Closed_Date
Then I want to SET Closed_Date = Date() IF Paid = true.
The UPDATE SQL will not generate any code unless there is a select * Table
in the TQuery SQL. If I add that I get a good SQL statment from UPDATE
but it will not run. ( No params in the TQuery. )
params will not allow adding of params directly, only through the SQL text.
So I add the VALUES aid, :Closed_Date
Now I get either a "syntax error" or, depending on how I play with the query text,
I may get "Error creating cursor handle".
1) How do you get a TQuery to accept type bool and act on it and
2) what is the correct means of setting up an Update Query
Here are the details if you care to see what I've already tried:
I have a functioning DB application where I use TQuery to Sort Ascending or Descending. I can edit and apply an SQL string on the fly to also Filter on any field
value. I can turn either the filter or the sort on or off with no adverse reactions.
Basicly everything works great.
Here's the problem. I want to Filter the table on a boolian field (true/false).
I can't get SQL to recognize Boolian values, I always get a blank filter.
Next, I want to pass 2 params to the Query; aid, :Closed_Date
Then I want to SET Closed_Date = Date() IF Paid = true.
The UPDATE SQL will not generate any code unless there is a select * Table
in the TQuery SQL. If I add that I get a good SQL statment from UPDATE
but it will not run. ( No params in the TQuery. )
params will not allow adding of params directly, only through the SQL text.
So I add the VALUES aid, :Closed_Date
Now I get either a "syntax error" or, depending on how I play with the query text,
I may get "Error creating cursor handle".