Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 12 total
Thread How to update/delete records
Fri, Aug 3 2012 8:31 AMPermanent Link

Uli Becker

I am just studying the latest master-detail sample application.

After having found out some very useful simplifications like
database.load() or dataset.params.add() and changing my testserver to
use that, I don't understand how updating and deleting of records works.
I know that I can do that by sending json to the server, but I can't see
how it's done in the sample application.

Can someone explain just the basics how to do that?

Thank you. Uli
Fri, Aug 3 2012 11:46 AMPermanent Link

Raul

Team Elevate Team Elevate

Uli,

Not sure about the demo app. however in general the process should be as follows. Note that I have not done much with #2 myself so this is theoretical to some degree but should be fairly correct.

1. If you want to do your own updates then collect data from fields and build the json or whatever you use and do a server request. If you have a TDataSet you are updating then you can handle the TDataSet various change methods (e.g. AfterSave event) and then use it to build your own web request again manually.

2. if you want more automation then you need to use the TDatabase transactions - basically once you commit the Transaction the TDatabase can build the differential JSON and send it the server using the POST and the Transaction specific JSON  - if you have your own backend then you do need to parse this out and update the data and then respond with 200 OK status. Built in web server should handle this already and i'm sure EDB and other elevate web servers will soon as well.


Raul

>>Can someone explain just the basics how to do that?
Fri, Aug 3 2012 12:06 PMPermanent Link

Uli Becker

Raul,

thanks a lot for your help.
I didn't know that a TDatabase.commit produces a JSON. Should be no
problem to parse that. ( I just see that the help file has some
information about that).

Regards Ui
Fri, Aug 3 2012 12:20 PMPermanent Link

Raul

Team Elevate Team Elevate

No problem

Actually looks like online help is mostly complete for Datasets so also see here : http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Transactions

Raul


Uli Becker wrote:

Raul,

thanks a lot for your help.
I didn't know that a TDatabase.commit produces a JSON. Should be no
problem to parse that. ( I just see that the help file has some
information about that).

Regards Ui
Fri, Aug 3 2012 1:04 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

<< Can someone explain just the basics how to do that? >>

Did you see the latest docs ?

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Updating_DataSets

http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Transactions

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Aug 3 2012 1:04 PMPermanent Link

Uli Becker

Raul,
> Actually looks like online help is mostly complete for Datasets so also see here : http://www.elevatesoft.com/manual?action=viewtopic&id=ewb1&topic=Transactions

Thanks. Brand new manual. Smile
Fri, Aug 3 2012 1:05 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Raul,

<< 2. if you want more automation then you need to use the TDatabase
transactions - basically once you commit the Transaction the TDatabase can
build the differential JSON and send it the server using the POST and the
Transaction specific JSON  - if you have your own backend then you do need
to parse this out and update the data and then respond with 200 OK status.
Built in web server should handle this already and i'm sure EDB and other
elevate web servers will soon as well. >>

Just wanted to confirm that yes, the built-in web server does this already,
and the EDB PHP extension will do so also soon, so you'll be able to do this
easily from PHP apps.

If you have any other questions, please let me know.

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Aug 3 2012 1:06 PMPermanent Link

Uli Becker

Tim,

> Did you see the latest docs ?

Telepathy... SmileRaul just pointed to the new OLH.

thank you.

Uli

Fri, Aug 3 2012 1:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Uli,

Just a quick note - I'll be adding a little more to the Transactions topic
to discuss how the URL and request is built during the Commit process, and
there will be a new property to specify the Commit portion of the URL in the
TDatabase component (similar to the DataSetName property of the TDataSet).
This is necessary for things like PHP that use portions of the URL with file
extensions (.php)

Tim Young
Elevate Software
www.elevatesoft.com
Fri, Aug 3 2012 1:25 PMPermanent Link

Uli Becker

Tim,

> Just a quick note - I'll be adding a little more to the Transactions
> topic to discuss how the URL and request is built during the Commit
> process, and there will be a new property to specify the Commit portion
> of the URL in the TDatabase component (similar to the DataSetName
> property of the TDataSet). This is necessary for things like PHP that
> use portions of the URL with file extensions (.php)

Great.

I am just working on a JSON parser to for the update- and delete stuff.
Would you like to share some code snippets that you are using in your
integrated webserver?

Best regards Uli
Page 1 of 2Next Page »
Jump to Page:  1 2
Image