Technical Articles
SAP Cloud Application Programming Model – Demo6
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.
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
How to get Cloud HANA database to the local system?
Will do a post on it..
Dhanasupriya Sidagam
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.logI 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?