How to add complete SQL Statement to TdaSQL
Hallo,
is possible to add whole SQL Statement to TdaSQL object and how?
I tried with :
if GetSQLObject(aReport,aSQL) then begin
aSQL.SQLText:= stSQL;
where stSQL is TStringList and contains the complete SQL Statement.
The troubles appeared by designer at runtime. I couldn't more look at the
calculation field, search field and others.
Greetings,
Stasa
is possible to add whole SQL Statement to TdaSQL object and how?
I tried with :
if GetSQLObject(aReport,aSQL) then begin
aSQL.SQLText:= stSQL;
where stSQL is TStringList and contains the complete SQL Statement.
The troubles appeared by designer at runtime. I couldn't more look at the
calculation field, search field and others.
Greetings,
Stasa
This discussion has been closed.
Comments
you can't assign a 'TStringList' to 'String'. You could assign 'stSQL.Text' instead.
IIRC you have to use property 'aSQL.MagicSQL(.Text)' not 'SQL', but I may wrong in this point. Don't forget to set property 'aSQL.EditSQLAsText' to 'True'.
In addition you may search here or in the enduser group, there are a lot of examples available.
HTH,
Chris Ueberall;
SQL-Text either by code as Stasa wants or at design time.
Try this:
- Open the report in the designer
- Create a new SQL-Statement (remeber to have the "edit SQL Text" checked)
- edit the newly created SQL-Text
-Then every click on the groups, sort, calc-Tabs will produce an AV
Is this WAD?
Cheers
Bernd
the tabs should disappear after setting 'Edit SQL as Text' to 'True'.
regards,
Chris Ueberall;
to edit the SQL text at runtime to work around the problem.
When you do edit the SQL text, you will lose all the query tool support,
because DADE generates SQL and if you edit the SQL, then we can't use the
objects you've defined int eh dataview to generate SQL that will merge with
your changes.
YOu can either use our query tools, edit the TdaSQL object at runtime by not
editing the SQLText or edit the SQLText.
Here is an example of editing the TdaSQL object in the preferred way instead
of editing the SQLText.
http://www.digital-metaphors.com/tips/ExtractSQLObject.zip
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com