Microsoft SQL Server with Classic ASP

These Classic ASP tutorials use Microsoft SQL Server as the relational database and ADO as the data-access API. The original material was written around SQL Server 2008-era tools; the concepts remain useful, but current development should use a supported SQL Server edition, current management tools and a supported SQL Server driver.

What a parameterized query looks like

Dim cmd
Set cmd = Server.CreateObject("ADODB.Command")
Set cmd.ActiveConnection = conn  ' Existing open ADO connection
cmd.CommandType = 1  ' adCmdText
cmd.CommandText = "SELECT name FROM student WHERE id = ?"
cmd.Parameters.Append cmd.CreateParameter("@id", 3, 1, , 5)

This is an illustrative query fragment. It requires an existing open conn and a matching SQL Server table; credentials and connection setup are explained in the database tutorials.

On this page — Show page sectionsHide page sections

Current SQL Server choices

Microsoft provides SQL Server Developer edition for non-production development/testing and SQL Server Express for smaller workloads. Use the current Microsoft SQL Server download page rather than the obsolete SQL Server 2008 R2 links that appeared in the historical tutorial.

Microsoft SQL Server downloads

Classic ASP learning path

Start by creating a tested connection, then learn how to run SELECT queries, display Recordsets, parameterize visitor-supplied values, create tables, work with identity values and inspect affected-row counts.

Driver note: Microsoft's current OLE DB Driver for SQL Server is the MSOLEDBSQL generation; the older SQLOLEDB provider is no longer recommended for new development.

Use safe database connections

Build a connection using a supported ADO/OLE DB provider, keep credentials outside public files and use parameterized ADODB.Command queries. SQL Server examples in this section should be tested with a disposable database.

Back to top ↑


ASP Home






✖
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
© 2000-2026 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer