Thanks guys. My workaround was to copy the SQL to the clipboard, and have a msgbox promting the user to paste it, and then call edit to pop up the free-hand SQL editor…fine for my purposes.
If this is an intended function, and not a bug, then why does BO bomb out so dramatically, instead of just raising an error?
Yeah, you’d think that BusObj would be able to come up with a more interesting, if not more informative error message!
Be that as it may, in the Object Model Diagram for Data Providers, it is noted that
Sadly for many of us, this translates to an inability to change the SQL in code (on the fly, as it were) for a freehand SQL data provider.
If your situation is at all like ours, where the desire was to provide prompts to our freehand SQL using existing universe lists of values, etc., then you might be interested to note that you can include @variable(prompt text) in your Where clause. There is a useful note on this subject in the BusObj Knowledge Base (Resolution Entry #6457).
[quote:38610993d4=“Dennis W. Disney”]Does that mean that you can overwrite the SQL of a data provider based on a universe?
[/quote]
I haven’t actually tried it myself (we do our best to not do any kind of SQL overrides of any kind), but according to the above, the answer should be yes. Maybe someone else can chime in with their experience.
If I remember you can edit the query technique SQL, but only for a mono query dataprovider (else you get a GPF). Also after editing the SQL you will get the option “do not generate the SQL…” activated, and you can’t desactivate it easilly !!!