SQL SERVER connection String for Classic ASP

How do I create a connection string for the classic ASP to connect with the Microsoft SQL Server Database

Author: Dorathoto, 2014-04-15

1 answers

Taking from the source, whenever I needed to use these connections strings, depending on your SQL SERVER and the providers installed on the application machine, you can make use of any Native Client to connect to a version of SQL SERVER greater than or equal to the version of your native client.

Native Client : the native client is a dedicated library to optimize the connection to SQL SERVER and allows you to work with persistence and data capture with all features that SQL SERVER (native version) allows (e.g. data types and new queries etc...).

Source: http://www.connectionstrings.com/sql-server /

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 ( all with non-native access )

oBanco.Open "Provider=sqloledb;Data Source=IPSERVIDOR;Initial Catalog=BASEDEDADOS;User ID=USUARIO;Password=SENHA;"
 7
Author: Roger Barretto, 2014-04-15 19:28:44