troubleshooting Question

Connecting a angular, ionic project for android to a local SQL server

Avatar of LIBRALEX
LIBRALEXFlag for South Africa asked on
AndroidAngularSQL
4 Comments1 Solution134 ViewsLast Modified:
I am writing a new project in angular and ionic, and coding in Visual Studio Code, using a tutorial from Udemy. In this tutorial, a API is used as an example ( newsapi.org ), for fetching data and displaying it etc. I also use cordova to build for android as this is a app that will be installed on a tablet.

In my project, I want to connect to a locally hosted database (SQL server 2017) that is simply installed on a windows 10 machine at each of our customers. I need basic CRUD operations (like inserting a new client that is captured on the tablet).  From what I have seen, almost everyone recomends writing an API to form the connection. Is this the only way to connect to a locally hosted db? I also came across a cordova plugin  (https://github.com/SergioDosSantos/cordova-plugin-sqlserver),  but this does not explain nicely how to implement it, and I was unable to get it to work correctly, when built, a error message "Tab1Page.html:21 ERROR TypeError: Cannot read property 'init' of undefined" is given.

What is the best way to connect to a local db?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros