I found some issues in AD 2.0.6. First, looking at new executed query results retrieve system (design is very good), and your suggest to add manually expected retuns as ptOutput params. There is an issue that makes is buggy and hard to use. For example, I have stored proc^
CREATE PROCEDURE proc1
RETUNS(OUT1 varchar(255); OUT2 varchar(255))
AS
BEGIN
OUT1='Output1';
OUT2='Output2';
END;
So I'd like to execute it and obtain its OUT2 return value using TADCommand:
So, setting CommandText to this command, two ptOutput parameters will be created, but in final SQL command RETURNING_VALUES will be omited. Similar with INSERT:
insert into TABLE1(ID, K)
values(gen_id(GEN_TABLE1_ID, 1), :K)
returning K, ID {into :p1, :p2}
So, no more will be needed to add parameters by hands or use Open instead of Execute.
2) Version build No. It is fixed. At moment I am rebuilding installer to support commercial, trial and free versions.
3) Regarding additional testing. In general, testing of all new areas will be interesting ! For example:
multiple TADTransaction + TADQuery with Firebird
multiple datasets persistance
automatic connection recovery
For in-mem dataset will be interesting to review it API and suggest what else is needed to become 1st Top in-mem dataset
Regarding EXECUTE PROCEDURE with output parameter and RETURNING. I have implemented (for 2.0.7) new escape sequence:
Good.
I found some other issues: 1. TADDataSet.SetTableConstraints contains code that looks buggy
if AFields[i] is TObjectField then
with TObjectField(AFields[i]) do
if DataType in [ftADT, ftArray] then begin
oCol := GetFieldColumn(AFields[I]);
if (DataType = ftArray) and SparseArrays and (Fields[0].DataType = ftADT) then
ProcessFields(oCol.NestedTable, nil, TObjectField(Fields[0]).Fields)
else
ProcessFields(oCol.NestedTable, nil, TObjectField(Fields[i]).Fields);
end;
I got 'List index out of range' while tring to TADQuery.Open 'select * from Tabl'
2. I got AV while commiting transaction with single TADQuery attached.
Tracing it I found that in TADAdaptedDataSet.Offline Command was nil.
So, setting CommandText to this command, two ptOutput parameters will be created, but in final SQL command RETURNING_VALUES will be omited. Similar with INSERT:
So, does it mean that I must know which out results must procedure return and in proper order, in order to create this escape sequence?
Hm... If so I think it wouldn't make much sense.
May be it would be better to internally use the same mechanism which is used by Open?
TIBSQL, TpFIBQuery (and may be the others too) don't distinguish Execute and Open (recordset retrieve).
Also there is small issue with opening execute-query (method Open). If query has no returns then TADCommand.Open throws EADException '[AnyDAC][Phys]-308. Command must return row set'.