I am creating a SharePoint hosted App where I need some data from SQL table. As my major work is on SharePoint list only,hence I don't want to go for Provider hosted App. Could you please provide me with any code or way to connect to SQL and fetch data from remote SQL server. It would be very helpful.
1 Answer
You can't securely connect to a database from a SharePoint hosted app since it runs client side. You can write a web service and connect to your web service from within your app. But then you need to figure out how to secure your web service.
-
could you please provide some more details or some link where I can find more information about. For this particular case, I am not bothered about security– AkhileshCommented Nov 14, 2017 at 8:10
-
A five-second Google query yielded this: stackoverflow.com/questions/857670/… Commented Nov 14, 2017 at 14:30