How do I create a connection string for classic ASP to connect to the Microsoft SQL Server database
How do I create a connection string for classic ASP to connect to the Microsoft SQL Server database
Native Client : The native client is a specific library to optimize the connection to SQL SERVER and allows you to work with persistence and data capture with all the features that SQL SERVER native) allows (Ex: Data types and new queries etc ...).
Source: link
Set oBanco = Server.CreateObject("ADODB.Connection")
SQL SERVER 2012:
oBanco.Open "Provider=SQLNCLI11;Server=IPSERVIDOR;Database=BASEDEDADOS;Uid=USUARIO;Pwd=SENHA;"
SQL SERVER 2008:
oBanco.Open "Provider=SQLNCLI10;Server=IPSERVIDOR;Database=BASEDEDADOS;Uid=USUARIO;Pwd=SENHA;"
SQL SERVER 2005
oBanco.Open "Provider=SQLNCLI;Server=IPSERVIDOR;Database=BASEDEDADOS;Uid=USUARIO;Pwd=SENHA;"
SQL SERVER ( Everyone with non-native access )
oBanco.Open "Provider=sqloledb;Data Source=IPSERVIDOR;Initial Catalog=BASEDEDADOS;User ID=USUARIO;Password=SENHA;"