Recent

Author Topic: CopyFromDataSet  (Read 451 times)

egsuh

  • Sr. Member
  • ****
  • Posts: 383
CopyFromDataSet
« on: July 11, 2019, 04:44:18 am »
Hi,
I tried some mixes, and ..

    BufDataSet1.CopyFromDataSet(SQLQuery1);

works fine.


And either of followings do not work.

    SQLQuery1.CopyFromDataSet(BufDataSet1);
    SQLQuery1.CopyFromDataSet(SQLQuery2);

Is there any way that I can make any of the two, which does not work? I'm writing a web server program, and the client has to download dataset from server, do some work on the dataset, and send it back to the server. The key is to use ApplyUpdates at the server side.


mangakissa

  • Hero Member
  • *****
  • Posts: 1065
Re: CopyFromDataSet
« Reply #1 on: July 11, 2019, 08:52:31 am »
I don't understand why you copy from SQLQuery to a bufdataset. SQLQuery has a connection to the database. It's not logical to put local data back to the 'server' if your client can do that.
It's better to use xml/json with tcpip to recieve/sent data to the server. After that the server can save the data to the database.
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

 

TinyPortal © 2005-2018