sqlserver2008连接字符串

.NET Framework Data Provider for SQL Server

Type .NET Framework Class Library
Usage System.Data.SqlClient.SqlConnection
Manufacturer Microsoft

Standard Security

Server=myServerAddress;Database=myDataBase;User Id=myUsername;Password=myPassword;
 
 

Trusted Connection

Server=myServerAddress;Database=myDataBase;Trusted_Connection=True;
 
 

Connection to a SQL Server instance

The server/instance name syntax used in the server option is the same for all SQL Server connection strings.

Server=myServerName\myInstanceName;Database=myDataBase;User Id=myUsername;
Password=myPassword;
 
 

Trusted Connection from a CE device

A Windows CE device is most often not authenticated and logged in to a domain but it is possible to use SSPI or trusted connection and authentication from a CE device using this connection string.

Data Source=myServerAddress;Initial Catalog=myDataBase;Integrated Security=SSPI;
User ID=myDomain\myUsername;Password=myPassword;

Note that this will only work on a CE device.

 
 

Connect via an IP address

Data Source=190.190.200.100,1433;Network Library=DBMSSOCN;Initial Catalog=myDataBase;
User ID=myUsername;Password=myPassword;
posted @ 2013-03-20 17:02  ..空白  阅读(176)  评论(0)    收藏  举报