Classic ASP SQL Server Database Connection

I am going to create a very basic Microsoft database for Microsoft SQL Server. However, connecting to the SQL Server database seems to require an ODBC connection on the server. Is there any way to overcome this?

+3
source share
1 answer

You did not specify which version of SQLServer, but you can use the 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

%>
+1
source

Source: https://habr.com/ru/post/1747168/


All Articles