I want to create a website that queries and inserts data to and from my configured SQL Database. I have not been able to write any code yet because I can't find any reference or documentation for Javascript.
-
Questions asking for tool/documentation/etc recommendations are off topic. What you're asking is for some basic SQL Server documentation. That's a job much better fit for bing/google, not StackOverflow. But... Even if you could do what you want to do: are you sure you want to connect to a database from JavaScript (that is, from your web page), where anyone can view source and see your connection string?David Makogon– David Makogon2016-07-16 07:22:54 +00:00Commented Jul 16, 2016 at 7:22
-
I think he's asking for JS documentation (he's already got a configured DB), @DavidMakogon ; Nevertheless, this is also asked and answered: stackoverflow.com/questions/857670/…Dan Rediske– Dan Rediske2016-07-18 16:18:36 +00:00Commented Jul 18, 2016 at 16:18
1 Answer
If you are looking for any solution about querying data against SQL Database from browser in javascript, I strongly don't recommend it. Because everyone browsing your website, can find your SQL Database's connection info. And your SQL Database will be exposed to public.
I recommend you to build a backend application for querying data from your SQL Database, and provides the data to your front website.
For more info about how to use the backend languages to connect to SQL Database, please refer to https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-nodejs-simple/.