Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Modified SQL-Query validation and execution.

edited June 2003 in End User
Guess I'll have to return to end-user modified sql's theme once more.

Here is what I was intended to do:
User can enter params in the manually-edited SQL in the following way
(select * from users where id = :MyParam), where :MyParam is a parameter
that is later on is going to be replaced with some actual value. But after
user presses OK, I receive the following error: "Invalid SQL statement.
Field 'MyParam' is of unknown type". So I have 2 problems:
1. How to switch off SQL query validation (or at least to be able to do it
myself)
2. Where can I change SQL (so that parameters would be replaced with actual
values) and pass it for inner use (Template.OnLoadEnd is no good, since I
need to see changes in SQL in other tabs immediately) so that the original
one remained unchanged? For example: In the query: "select * from users
where id = :MyParam" after OK button is pressed in the DADE SQL window, I
want to replace :MyParam with value "5" and pass "select * from users where
id = 5" query for execution. For that I need to switch-off SQL validation
and pass changed SQL for execution.

Can you help me with this one?

Thanks,
MB

Comments

This discussion has been closed.