Connection string is NOT so simple sometimes

1. OLEDB provider:
Provider=sqloledb.1; Data Source=190.190.200.100,1433; Network Library=DBMSSOCN; Initial Catalog= pubs; UserID=YOURUSERID; Password=YOURPASSWORD;
(DBMSSOCN=TCP/IP instead of Named Pipes, at the end of the Data Source is the port to use (1433 is the default))

2. .Net connection string:
connectionString="Server=(local);Integrated Security=True;Database=BalloonShop" providerName="System.Data.SqlClient"

你可能感兴趣的:(Connection)