Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: AD 2.0.6 issues
AD 2.0.6 issues
Posted: 2007/11/07 06:17
 
Hi, Dmitry!

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:

  ADCommand1.SQL.Text:='execute procedure proc1'; ADCommand1.Prepare; ADCommand1.Params.Add('OUT2'ftUnknown0ptOutput); ADCommand1.Execute; ShowMessage(ADCommand1.Values['OUT2']);


But istead of expected 'Output2' I get 'Output1' - because it was my "first" out put param.

So I need to add all return params in proper order.

Also for

  insert into TABLE1(IDK) values(gen_id(GEN_TABLE1_ID1), :K) returning KID


and so on.

But while fetching it gets all the information (anyway "open insert" is the thing I can hardly understand

AD2 looks very good. I hope some day it would be my favorite DAC

Also somewhy AD2.0.6 has 2.0.5's version and build.

Thank you.
Regards, SSW.

PS. Having some free time, I can test more carefully AD (InMem, IB/F.
Which parts/components would you advise?
Re:AD 2.0.6 issues
Posted: 2007/11/07 06:24
 
Are you talking about Firebird ?
Re:AD 2.0.6 issues
Posted: 2007/11/07 07:05
 
>Are you talking about Firebird ?

Yes
Sorry, I had some internet problems causing that I was composing my post half of day by parts.

PS. Please delete the second topic
Re:AD 2.0.6 issues
Posted: 2007/11/08 02:45
 
Hello

Thank you for reporting !

1) Regarding EXECUTE PROCEDURE with output parameter and RETURNING.
I have implemented (for 2.0.7) new escape sequence:

 execute procedure proc3 {returning_values :out1, :out2}


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(IDK) values(gen_id(GEN_TABLE1_ID1), :K) returning KID {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

Regards,
Dmitry
Re:AD 2.0.6 issues
Posted: 2007/11/08 04:09
 

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[iis TObjectField then   with TObjectField(AFields[i]) do     if DataType in [ftADTftArraythen begin       oCol := GetFieldColumn(AFields[I]);       if (DataType ftArray) and SparseArrays and (Fields[0].DataType ftADTthen         ProcessFields(oCol.NestedTablenilTObjectField(Fields[0]).Fields)       else         ProcessFields(oCol.NestedTablenilTObjectField(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.

Regards, SSW.
Re:AD 2.0.6 issues
Posted: 2007/11/08 05:02
 
1) Second:

 ProcessFields(oCol.NestedTablenilTObjectField(Fields[i]).Fields


is incorrect. Must be:

 ProcessFields(oCol.NestedTablenilFields)


2) Could you provide simplest demo app, please ?

Regards,
Dmitry
Re:AD 2.0.6 issues
Posted: 2007/11/08 09:42
 
>2) Could you provide simplest demo app, please ?

Yes.

  var oQueryTADQuery;     oTransTADTransaction; ...   ADTransaction1.StartTransaction;   oQuery:=TADQuery.Create(nil);   try     oQuery.Connection:=ADConnection1;     oQuery.Transaction:=ADTransaction1;     oQuery.SQL.Text:='select * from T5'//any query     oQuery.Open//ExecSQL too   finally     FreeAndNil(oQuery);   end;   ADTransaction1.Commit;





  execute procedure proc3 {returning_values :out1, :out2}


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).

Thank you.

Regards, SSW.
Re:AD 2.0.6 issues
Posted: 2007/11/15 23:53
 
Hi, Dmitry!

So, are there any news?

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'.

And it seems to be corect

Thank you.
Re:AD 2.0.6 issues
Posted: 2007/11/16 07:12
 
Hello

I am sorry, but at moment I am very busy with project migration.
http://www.da-soft.com/content/view/117/72/

I will be back to Beta on next week.

Regards,
Dmitry