Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
Dhanasupriya
Active Participant
Hello All

Here is my blog post on how to connect SAP Cloud Application Programming model application to SQLite Database using SAP Business Application Studio IDE.

Please read and suggest your inputs to my earlier blogs on SAP CAPM:

https://blogs.sap.com/2020/05/01/sap-cloud-application-programming-model-demo1/

https://blogs.sap.com/2020/05/03/sap-cloud-application-programming-model-demo2/

https://blogs.sap.com/2020/05/10/sap-cloud-application-programming-model-demo3/

https://blogs.sap.com/2020/05/16/sap-cloud-application-programming-model-demo4/

https://blogs.sap.com/2020/06/07/sap-cloud-application-programming-model-demo5/

In this post, i have created the SAP CAPM application following the steps from blog: https://blogs.sap.com/2020/05/03/sap-cloud-application-programming-model-demo2/

Once the project is created, check the output by running the command cds watch in terminal.



Follow the below steps to connect our SAP CAPM application to SQLite Database.

Run the command cds deploy --to sqlite:studentreport.db from terminal.


This adds studentreport.db to our project structure.

Also check the added db details in package.json file.



Open File > Settings > Open Preferences:


Search for Sqltools and click on settings.json:


Add this object to connections in settings.json file.
 "sqltools.connections": [
{
"name" : "SQLite",
"dialect": "SQLite",
"driver":"SQLite",
"database": "/home/user/projects/studentreport/studentreport.db"
}
]


Check the connections in SQLTools.


Expand the connected Database and check for the data records.



We can insert, check the query details and play around the feasible SQL operations.

Please use comment box..

Thank you!! 🙂

#EnhanceLearning

BR//Dhanasupriya Sidagam
4 Comments
former_member643578
Participant

How to get Cloud HANA database to the local system?

Dhanasupriya
Active Participant
Will do a post on it..
praveenktrde
Employee
Employee
0 Kudos
dhanasupriya1498

When I try to click on connect, SAP Application studio tells me "You need to install "sqlite3@4.1.1" to connect to sqlite - bookshop." but when I click on Install Now, then I get below mentioned error.

Failed to install dependencies for SQLite: Request DependencyInstaller/install failed with message: > sqlite3@4.1.1 install /tmp/vscode-unpacked/sqltools-0.21.8.vsix/extension/node_modules/sqlite3 > node-pre-gyp install --fallback-to-build sh: 1: node-pre-gyp: not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! sqlite3@4.1.1 install: node-pre-gyp install --fallback-to-build npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the sqlite3@4.1.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/user/.npm/_logs/2020-09-03T13_06_08_382Z-debug.log
suresh_muthusamy
Explorer
0 Kudos
I used Npm install sqlite3 and it worked good.

My question is that, is it possible to deploy this into cf with just the sqlite db or do i need hana db for this?
Labels in this area