Last updated: August 26, 2026.
Use ADO with Microsoft’s supported OLE DB driver for SQL Server. Enable encryption and keep credentials outside downloadable files.
<%
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
conn.Open "Provider=MSOLEDBSQL;" & _
"Server=tcp:sql01.example.com,1433;" & _
"Database=ApplicationDb;" & _
"User ID=app_user;Password=replace-with-secret;" & _
"Encrypt=Mandatory;TrustServerCertificate=No;"
%>Windows authentication
Provider=MSOLEDBSQL;Server=sql01.example.com;Database=ApplicationDb;Integrated Security=SSPI;Encrypt=Mandatory;TrustServerCertificate=No;With integrated security, grant SQL Server access to the IIS application-pool identity. Use parameterized ADODB.Command objects for all request values.
Need SQL Server forms and reports? PHPRunner can generate the application layer.