cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CAP Attachments - data not updated in hana cloud db

GowthamRaja
Participant
0 Kudos

Hi Experts,

I am working on attachments in sap cap. I am following the below tutorial

https://community.sap.com/t5/technology-blogs-by-members/my-journey-towards-using-ui5-uploadset-with...

As per the tutorial, i can able to post and get the attachments. 

when i test i can able to see the data locally as shown below. but i want to see the data in hana cloud db.

Seeing data locallySeeing data locally

Connect to local sqlite dbConnect to local sqlite db

Why this is connecting to sqlite db by default even i have hana cloud db.

Do we need to specify the hana db here?

Please help.

Thanks,

Gowtham

Accepted Solutions (1)

Accepted Solutions (1)

MioYasutake
Active Contributor
0 Kudos

@GowthamRaja 
By default CAP Node.js stores data in in-memory sqlite db. To store data in HANA Cloud, deploy your service once to the Cloud Foundry, then bind your service to HANA db as described in the following document.

https://cap.cloud.sap/docs/advanced/hybrid-testing

 

 

GowthamRaja
Participant
0 Kudos

@MioYasutake: Thanks for response. I have used the cli command "cds bind -2 my-hana:my-hana-key" and its works. i can able to see the data stored in hana cloud db.

Note: instance and key is taken from cdsrc.json file

just correct me if i am wrong. so to connect to hana cloud db we need to execute "cds watch --profile hybrid" and to test locally using in-memory sqlite we need to execute "cds watch". Please confirm

 

MioYasutake
Active Contributor

@GowthamRaja

Yes, your understanding is correct.

Answers (0)