Sql-server – Classic ASP SQL Server Database Connection

asp-classicsql server

I am aiming to create a very basic web based DBMS for Microsoft SQL Server. However, in order to connect to a SQL Server database you seem to require a ODBC connection on the server. Is there any possible way to overcome this?

Best Answer

You haven't stated which version of SQLServer but you can use OLEDB connection in ASP.

<%

Dim conn
Set conn = Server.CreateObject("ADODB.Connection")

conn.Open "Provider=SQLOLEDB; Data Source = (local); Initial Catalog = Northwind; User Id = sa; Password="

If conn.errors.count = 0 Then   
   Response.Write "Connected OK"
End If

%>