Where is RequesLive

The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
Post Reply
kikep
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 06.03.2024, 17:47

Where is RequesLive

Post by kikep »

on documentation sad setup zquery like that but property requestlive is not show up
TZQuery:
Connection: conEmployee
Name: qryCustomer
RequestLive: True // where is this property
SQL: SELECT * FROM customer ORDER BY customer
when you don't read the manuels sad tutorial or manual explain it or that but on this case reference to the property witch is not there why...

this is my code what i doing wrong to get message register not update when as DM.ZqPo.RowsAffected

Code: Select all

procedure TFormAdo.BtnRunSQlClick(Sender: TObject);
begin
    if not DM.ZQPo.Active  then ShowMessage('Connection not active!'); //for test

     with DM.ZUPo.Params do begin
       DM.ZUPo.Params.ParamByName('PurchaseOrderDate').AsString:='{d''2024-03-07''}';
       DM.ZUPo.Params.ParamByName('OrderType').AsString:='S';
       DM.ZUPo.Params.ParamByName('MasterRepeatingPOOrSO').AsString:='  ';
       DM.ZUPo.Params.ParamByName('Old_PurchaseOrderNumber').AsString:=DM.ZQPo.FieldByName('PurchaseOrderNumber').AsString;
       DM.ZUPo.Params.ParamByName('Old_Division').AsString:=DM.ZQPo.FieldByName('Division').AsString;
     end;
     Dm.ZQPo.Active:=false;
     Dm.ZUPo.ModifySQL.SaveToFile('adosql.txt');
     Try
      DM.ZQPo.ExecSQL;
      if( DM.ZqPo.RowsAffected>0) then begin; not get update the register
         DM.ZQPo.ApplyUpdates;
      end else begin
        ShowMessage('Purchase Order not Updated');
      end;
    except  on e: Exception do begin
      DM.ZQPo.CancelUpdates;
      Showmessage('Exceptionclass = ' + E.ClassName + ' / ' + E.Message);
     end;
    end;
    DM.ZQPo.Open;
end;



this my sqlmodify
UPDATE PO1_PurchaseOrderEntryHeader SET
PurchaseOrderDate = :PurchaseOrderDate ,
OrderType = :OrderType ,
Division = :Division ,
MasterRepeatingPOOrSO= :MasterRepeatingPOOrSO,
Division=:Division
WHERE PurchaseOrderNumber = :Old_PurchaseOrderNumber
AND Division =:Old_Division

only wanna to update purchaseorderdate, Ordertype, MasterRepeatingPOOrSO

the sql not problem is correct because i don't get any error of sql only not update the record
some body can help me please.... or what i have to....
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Where is RequesLive

Post by marsupilami »

Hello kikep,

RequestLive is a very old property that was remved with Zeos 7.0. RequestLive had the inverse meaning to the ReadOnly property. When RequestLive was set, an updateable result set was requested. So if the manual says you should set RequestLive to true, this translates to set ReadOnly to false these days.

Unfortunately I never got around to rewriting the documentation. I will take a look at RequestLive and see if I can fix the documentation in that aspect.

Best regards,

Jan
kikep
Fresh Boarder
Fresh Boarder
Posts: 19
Joined: 06.03.2024, 17:47

Re: Where is RequesLive

Post by kikep »

OK i suppose that in old version was enable but in recently version.... but is now manual of new version is for old version...
some example of use tzupdate with tzquery i tied different way i don't get works for me..

thanks...
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: Where is RequesLive

Post by marsupilami »

As far as TZUpdateSQL goes:
Please use it only if you have to. Zeos should handle these things in a lot of cases automatically.

If you have to use TZUpdateSQL: Fill in the InsertSQL, UpdateSQL and DeleteSQL properties as needed. Use :<FIELDNAME> in the SQL statamants to have parameters for the new field value. Use :OLD_<FIELDNAME> to access the old field values. If you have correct primary keys and generate them in the program (use TZSequence?) then using OLD_ should not be necessary.

Let me know what doesn't work for you.

Best regards,

Jan
Post Reply