Connecting a SQL db from HTML/Javascript

NM 41 Reputation points
2021-03-27T21:26:46.91+00:00

Hello,

I am looking for a simple query to connect to a SQL server DB in Windows authentication mode from an HTML form.
Experts please suggest.

Thanks,
NM

SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. CarrinWu-MSFT 6,891 Reputation points
    2021-03-29T05:20:04.067+00:00

    Hi @NM ,

    There is no common way to connect to SQL Server database from JavaScript client, every browser has its own API and packages to connect to SQL Server. It is not recommended to use JavaScript clients to access databases for several reasons. Please refer to How to connect SQL Server database from JavaScript in the browser ? get more details.

    Best regards,
    Carrin


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.