bioman 1 Posted August 16, 2019 Thank you for providing the MARS Library. Delphi client is being built using MARS Library. FIREDAC' CRUD (especially updated) implementation is challenging.Can I get a sample source for how to implement updates in full or record units?Thank you again for providing me with a good library. Share this post Link to post
Andrea Magni 75 Posted August 16, 2019 Hi @bioman, there are several approaches to the topic (CRUD operation against a DB). MARS doesn't dictate one specifically. Would you please specify if you are building a Delphi to Delphi solution (Delphi on the client and Delphi on the server)? You can have a dataset-oriented approach (client asks for a dataset, modifies it, changes are sent back to the server in form of delta updates) or a more general record-oriented approach (client asks for data, server sends a JSON array, client makes POST or PUT calls with modified/new data records). It also matters if you are looking for a data-centric approach (i.e. sending whole records from DB to client and back) or more interpolated approach (client commands REST server to perform operations that results in data manipulation). MARS is a lightweight library and I am trying not to dictate some aspects (more related to application than library IMO) so there are many ways to use it. Thanks for the kind words! Sincerely, Andrea Share this post Link to post
bioman 1 Posted August 16, 2019 (edited) Thank you for your prompt reply. I'm making a Delphi to Delphi solution. Based on the FireDAC Basic Semple you provided, Get method has been implemented. To implement Update Should clients send DataSet or Record JSON to the server and implement update logic directly on the server? Thank you. Andrea Edited August 16, 2019 by bioman Share this post Link to post
bioman 1 Posted August 16, 2019 Update issues resolved and work wellWe analyzed the FireDAC Basic Source you provided and solved it. Thank you. Share this post Link to post
Andrea Magni 75 Posted August 20, 2019 Hi @bioman, glad you sorted out in the meantime. The "FireDAC Basic" demo is the dataset-oriented (quite C/S+briefcase) way of handling data through MARS. I would suggest to have a look to EKON22 demo, specifically looking for the TRecord<R>.FromDataSet and the use of TMARSFireDAC there. Sincerely, Andrea Share this post Link to post