Hello,
I've to build dynamic queries (ie not defined with the designer).
Do you have any example?
By my side I have an exception by execution:
EAssertionFailed, AssertionFailure
\MyDac\Source\MySqlStmt.pas, line436
Here an example of my definition:
Query_Current_User := TMyQuery.Create(Owner);
with Query_Current_User do
begin
Connection := Orasession_aktiv;
SQL.Text := 'SELECT'+
' *'+
' FROM'+
' DFATAI.USER_TAI_V'+
' WHERE' +
' DFATAI.USER_TAI_V.USER_ID = :USER_ID';
UniDirectional := True;
params.CreateParam(ftUnknown,'USER_ID',ptUnknown);
end;
And the call which fails:
with DataModule_Main.Query_Current_User do
begin
ParamByName('USER_ID').AsString := str;
Active := false;
Prepare;
====> Active := true;
The same if I set the FieldType and the ParamType
THx for your help