A fork of node-mssql (v3.3.1) with added dynamic driver option for browserify compatibility. Provides a unified interface for multiple TDS drivers (Tedious, msnodesqlv8, etc.) to connect to Microsoft SQL Server. Includes connection pooling, stored procedures, transactions, prepared statements, bulk load, TVP, and JSON support (SQL Server 2016+). Default driver is Tedious. Primarily used as a drop-in replacement for node-mssql until the patch is upstreamed. Note: This fork may be deleted if the patch is accepted; prefer node-mssql for production.
npm install mssql2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Connects to SQL Server, runs a parameterized query using tagged template literals, and logs the result.
Use the original node-mssql package instead unless you specifically need browserify compatibility.
Test thoroughly if using in browserify; consider using tedious directly.
Migrate callback patterns to Promises or async/await.
Append ?encrypt=true to connection string when connecting to Azure.
Use await sql.connect() before running queries.
Ensure SQL Server is running and port 1433 is accessible.
Check username/password; enable SQL Server authentication.
Use sql.input() or tagged template literal for parameters.