Loading

Wednesday, June 29, 2011

Connection Strings for SQL Server 2000 and 7.0


.NET Framework Data Provider for SQL Server
Standard Security
Data Source=ServerName;Initial Catalog=DatabaseName;User Id=UserName;Password=Password;


Standard Security alternative syntax
Server=ServerName;Database=DatabaseName;User ID=UserName;Password=Password;Trusted_Connection=False;


Trusted Connection
Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=SSPI;


Connecting to an SQL Server instance
Server=ServerName\theInstanceName;Database=DatabaseName;Trusted_Connection=True;


Trusted Connection from a CE device
Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=SSPI;User ID=myDomain\UserName;Password=Password;

Note: This will work on a CE device only. 

Connect via an IP address
Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=DatabaseName;User ID=UserName;Password=Password;
DBMSSOCN=TCP/IP.
Note: 1433 is the default port for SQL Server.

Microsoft OLE DB Provider for SQL Server

Standard Security
Provider=sqloledb;Data Source=ServerName;Initial Catalog=DatabaseName;User Id=UserName;Password=Password;


Trusted connection
Provider=sqloledb;Data Source=ServerName;Initial Catalog=DatabaseName;Integrated Security=SSPI;


Connecting to an SQL Server instance
Provider=sqloledb;Data Source=ServerName\theInstanceName;Initial Catalog=DatabaseName;Integrated Security=SSPI;


Connect via an IP address
Provider=sqloledb;Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=DatabaseName;User ID=UserName;Password=Password;
DBMSSOCN=TCP/IP.

This use to connect the SQL Server Database via internet connection.

SHARE TWEET

Thank you for reading this article Connection Strings for SQL Server 2000 and 7.0 With URL http://x-tutorials.blogspot.com/2011/06/connection-strings-for-sql-server-2000.html. Also a time to read the other articles.

0 comments:

Write your comment for this article Connection Strings for SQL Server 2000 and 7.0 above!