The loop in AssignParameters should be
for i := 0 to Length(params) - 1 do begin
p := PVarData(@params[i]);
currently the params are "off by one" as the TUIBQuery.Params.As*[] array
starts from 0 (zero), current code assumes 1 (one).
Also add "FQuery.Prepare(True)" call to the TdwsUIBDataSet constructor:
constructor TdwsUIBDataSet.Create(db : TdwsUIBDataBase; const sql : String;
const parameters : TData);
begin
FDB:=db;
inherited Create(db);
FQuery:=TUIBQuery.Create;
try
FQuery.FetchBlobs:=True;
FQuery.Transaction:=db.FTransaction;
FQuery.SQL.Text:=sql;
FQuery.Prepare(True);
AssignParameters(FQuery, parameters);
FQuery.Open;
this helps to convert parameters to correct SQL types.
Original issue reported on code.google.com by ain.val...@gmail.com on 4 Jun 2013 at 1:50
Original issue reported on code.google.com by
ain.val...@gmail.com
on 4 Jun 2013 at 1:50