how to make sending data from the client to the web service delphi if the tables on one database has many fields and 50 are effective and do not overload the network. I made ​​it by making the variable type olevariant like this:

how to make sending data from the client to the web service delphi if the tables on one database has many fields and 50 are effective and do not overload the network. I made ​​it by making the variable type olevariant like this:

function Tcustomer.toOleVariant: OleVariant;
begin
   Result: = VarArrayOf ([
     edtnamecus.text,
     edtaddress.text,
    etc. .. ]);
end;

thank you

Comments

  1. Of course you should ;-) like Nick Hodges say.
    Andrea Raimondi how to read in web service side? thanks

    ReplyDelete
  2. First off, please remember that you are moving a Delta, not the whole dataset. This means you will have somehow to apply the delta.

    procedure TForm1.ReadData(AStream: TStream);
    var DecompressStream : TDecompressionStream;
        DeltaData : TMemoryStream;
        Buffer: array[ 1..1024 ] of byte;
    begin
      DecompressStream := TDecompressionStream.Create( AStream );
      DecompressStream.Position := 0;
      DeltaData := TMemoryStream.Create;
      while DecompressStream.Position <> DecompressStream.Size do
      begin
        DecompressStream.Read( Buffer, SizeOf( Buffer ) );
        DeltaData.Write( Buffer, SizeOf( Buffer ) );
      end;
      // Now you have the delta and can do whatever you want with it!
      DecompressStream.Free;
      DeltaData.Free; // Call THIS free only after you've processed it.
    end;

    ReplyDelete

Post a Comment