World's Originating Website
Well Come To The World's Originating Websites Of Free Tricks

Join the forum, it's quick and easy

World's Originating Website
Well Come To The World's Originating Websites Of Free Tricks
World's Originating Website
Would you like to react to this message? Create an account in a few clicks or log in to continue.
World's Originating Website

Gprs trick , Ring Tones , Games ,Apps And Many More


You are not connected. Please login or register

Connection Strings

Go down  Message [Page 1 of 1]

1default Connection Strings Tue May 24, 2011 3:58 pm

Admin

Admin
Admin
Here you got all type of connection string...



So,enjoy...



Last edited by Admin on Sun Nov 20, 2011 8:42 pm; edited 1 time in total


_________________
Connection Strings 255-10-1-1280837974jPx3d7
https://dl4u.forumotion.net

Admin

Admin
Admin
ODBC DSN



using System.Data.Odbc;

OdbcConnection conn = new OdbcConnection();
conn.ConnectionString =
"Dsn=DsnName;" +
"Uid=UserName;" +
"Pwd=Secret;";
conn.Open();


ODBC -- Standard Connection

using System.Data.Odbc;

OdbcConnection conn = new OdbcConnection();
conn.ConnectionString =
"Driver={SQL Server};" +
"Server=ServerName;" +
"DataBase=DataBaseName;" +
"Uid=UserName;" +
"Pwd=Secret;";
conn.Open();


ODBC -- Trusted Connection


using System.Data.Odbc;

OdbcConnection conn = new OdbcConnection();
conn.ConnectionString =
"Driver={SQL Server};" +
"Server=ServerName;" +
"DataBase=DataBaseName;" +
"Uid=;" +
"Pwd=;";
conn.Open();

// or

OdbcConnection conn = new OdbcConnection();
conn.ConnectionString =
"Driver={SQL Server};" +
"Server=ServerName;" +
"DataBase=DataBaseName;" +
"Trusted_Connection=Yes;";
conn.Open();


_________________
Connection Strings 255-10-1-1280837974jPx3d7
https://dl4u.forumotion.net

Admin

Admin
Admin
OleDb -- Standard Connection



using System.Data.OleDb;

OleDbConnection conn = new OleDbConnection();
conn.ConnectionString =
"Driver=SQLOLEDB;" +
"Data Source=ServerName;" +
"Initial Catalog=DataBaseName;" +
"User id=UserName;" +
"Password=Secret;";
conn.Open();


OleDb -- Trusted Connection

using System.Data.OleDb;

OleDbConnection conn = new OleDbConnection();
conn.ConnectionString =
"Driver=SQLOLEDB;" +
"Data Source=ServerName;" +
"Initial Catalog=DataBaseName;" +
"Integrated Security=SSPI;";
conn.Open();


OleDb -- via IP Address

using System.Data.OleDb;

OleDbConnection conn = new OleDbConnection();
conn.ConnectionString =
"Driver=SQLOLEDB;" +
"Network Library=DBMSSOCN;" +
"Data Source=xxx.xxx.xxx.xxx,1433;" +
"Initial Catalog=DataBaseName;" +
"User id=UserName;" +
"Password=Secret;";
conn.Open();


_________________
Connection Strings 255-10-1-1280837974jPx3d7
https://dl4u.forumotion.net

Admin

Admin
Admin
.NET DataProvider -- Standard Connection

using System.Data.SqlClient;

SqlConnection conn = new SqlDbConnection();
conn.ConnectionString =
"Data Source=ServerName;" +
"Initial Catalog=DataBaseName;" +
"User id=UserName;" +
"Password=Secret;";
conn.Open();





.NET DataProvider -- Trusted Connection

using System.Data.SqlClient;

SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Data Source=ServerName;" +
"Initial Catalog=DataBaseName;" +
"Integrated Security=SSPI;";
conn.Open();





.NET DataProvider -- via IP Address

using System.Data.SqlClient;

SqlConnection conn = new SqlConnection();
conn.ConnectionString =
"Network Library=DBMSSOCN;" +
"Data Source=xxx.xxx.xxx.xxx,1433;" +
"Initial Catalog=DataBaseName;" +
"User Id=UserName;" +
"Password=Secret;";
conn.Open();



_________________
Connection Strings 255-10-1-1280837974jPx3d7
https://dl4u.forumotion.net

Sponsored content


Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum