So this is related to my earlier question.

So this is related to my earlier question.

So originally I had Datasnap WebBroker Application where I am sending ClientDataSet from Client to Server and also uploading file from Client to server and saving the same to database.

I manually add fields to ClientDataset. Then populate it with data and then send from client to server using this code
cdsTemp.SaveToStream(MemoryStreamCusotmer)

And at server I basically read the stream as below
cdsTemp.LoadFromStream(MemoryStreamCusotmer);

Similarly for streaming file I do this from client
myFileStream := TFileStream.Create(FileName, fmShareDenyWrite);

And at server I do this to save to database.
TBlobField(qryTemp.FieldByName('FPData')).LoadFromStream(myFileStream);

To test performance I wrote simple TCP/IP based DataSnap Server.
Problem is that above code doesn't work any more.

This is the error I get for Client dataset issue
cdsTemp: Missing data provider or data packet

And for streaming file this is the error I get
Range check error

Please advice what can I do to change my original  Datasnap WebBroker Application to Datasnap TCP/IP service based with minimal change . Thank.

Comments