Change SQL programmatically
Posted: Thu 14 Mar 2013 08:21
When I change programmatically the SQL statement of TSmartQuery or TOraQuery instance I received incorrect result (that is the query returns records that contains wrong data for example date field may have same date for all rows instead of various dates).
Code example:
Query.Close;
Query.Sql.Text := 'Select x,y,z From ...;
Query.Open;
Environment:
Delphi XE
ODAC 8.6.12
Oracle 10g
Comments:
1. The query created in design time and has fields that match the new statement.
2. This issue does not exists in Delphi 2007 with older ODAC components.
Code example:
Query.Close;
Query.Sql.Text := 'Select x,y,z From ...;
Query.Open;
Environment:
Delphi XE
ODAC 8.6.12
Oracle 10g
Comments:
1. The query created in design time and has fields that match the new statement.
2. This issue does not exists in Delphi 2007 with older ODAC components.