1. Working with SQL Client:
1.1 NameSpace: System.Data.SqlClient;
1.2 Objects: DataSet dataSet;
SqlConnection conn;
SqlDataAdapter dbAdapter;
1.3 Connection Strings:
1.3.1 Using Windows Authentication Mode of Connectivity:
string conString = "Server=.\\SQLEXPRESS;" +
"DataBase=yourDatabase;" +
"Integrated Security=SSPI;";
1.3.2 Using SQL Server Authentication Mode of Connectivity:
string conString = "Server=.\\SQLEXPRESS;" +
"DataBase=yourDatabase;" +
"Uid=yourUserId;Pwd=yourPassword;";
2. Working with OLEDB:
2.1 NameSpace: System.Data.OleDb;
2.2 Objects: DataSet dataSet;
OleDbConnection conn;
OleDbDataAdapter dbAdapter;
2.3 Connection Strings:
2.3.1 Using Windows Authentication Mode of Connectivity:
string conString = "Provider=SQLOLEDB;" +
"Data Source=.\\SQLEXPRESS;" +
"Initial Catalog=yourDataBase;" +
"Integrated Security=SSPI;";
2.3.2 Using SQL Server Authentication Mode of Connectivity:
string conString = "Provider=SQLOLEDB;" +
"Data Source=.\\SQLEXPRESS;" +
"Initial Catalog=yourDataBase;" +
"Uid = yourUserId; Pwd = yourPassword;";
This blogger is recording some code samples,technical skill of java,.Net,javascript, css, html for myself use. All articles are coming from my own experience and my collections which are from internet world. If you find any material have copy right issue please leave a comment to me. I will delete it immediately. These articles are writing in English or Chinese. Hope these information can help other technical guys. Thanks for reading.
Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts
Monday, August 2, 2010
Subscribe to:
Posts (Atom)