1

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.

meet-bhagdev
  • 2,608
  • 18
  • 22
  • 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 Jul 16 '16 at 07:22
  • I think he's asking for JS documentation (he's already got a configured DB), @DavidMakogon ; Nevertheless, this is also asked and answered: http://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript-in-the-browser – Dan Rediske Jul 18 '16 at 16:18

1 Answers1

3

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/.

Gary Liu
  • 13,758
  • 1
  • 17
  • 32