Christopher Herold
Posts: 0
Joined: Fri Jun 28, 2013 8:27 pm

Database Update Service: How?

It would be awesome if there were a tutorial on how to update a database entry. I am trying to use the database update service and it isn't entirely clear how to go about specifying the row that needs to be updated. For instance, in the database query service "where" is included in the request field to select the rows of interest, however, this does not appear to exist for the update service.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Database Update Service: How?

You don't use 'where' when doing an update. You update a particular object by specifying its id in the URL: http://docs.appery.io/documentation/b...

Christopher Herold
Posts: 0
Joined: Fri Jun 28, 2013 8:27 pm

Database Update Service: How?

Is there documentation for updating a database using the GUI format in the Data tab after I create the database_update_service?

I can use the Data tab GUI successfully for the Query and List Services ...looking for similar functionality for UPDATE.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Database Update Service: How?

Did you generate the service via Create New Database Service?

Christopher Herold
Posts: 0
Joined: Fri Jun 28, 2013 8:27 pm

Database Update Service: How?

Yes I did. I have a list of service parameters under the Edit MappingRequest tab as listed below. I imagine object_id is the the key I would use to identify the row? Is that correct?

Name Value JavaScript
X-Appery-Database-Id Add JS
X-Appery-Session-Token Add JS
user_name Add JS
user_id Add JS
text Add JS
object_id

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Database Update Service: How?

[quote:]
I imagine object_id is the the key I would use to identify the row? Is that correct?
[/quote]
Correct. That will identify the object. Any fields you add will be updated. Any fields you don't list, won't be updated.

Nalini
Posts: 0
Joined: Tue Jan 14, 2014 2:49 pm

Database Update Service: How?

Hello, I have the same question. I'm trying to update a small form which uses create service to send data to appery db.

I used update service [request tab] to update form but results are now showing up in db. I've attached images. Can you tell me if my mapping is correct?

Image Image

Nalini
Posts: 0
Joined: Tue Jan 14, 2014 2:49 pm

Database Update Service: How?

Hello, I wasn't sure if i should start another thread, but the question is almost the same, except I'm using local storage variable to identify the record that needs to be updated.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Database Update Service: How?

Hello! Please check in console what data is sent and returned by server?

Nalini
Posts: 0
Joined: Tue Jan 14, 2014 2:49 pm

Database Update Service: How?

Hello, the update service is still now working. Please help

Return to “Issues”