Some problems in deep SQL data connection
I still don’t know the difference between the various keywords in the connectionstring very much.It’s cumbersome to death.
Now let’s briefly describe some relevant insights......
****************** *********************************
What is the difference between initial catalog and database
Initial Catalog ;DataBase: There is actually no difference between the two but the name is different, as if the real name of a human being is the same as the previous name..Can call you.
********************************************
Integrated Security=SSPI This means to log in to the SQL SERVER server as the current WINDOWS system user.If the SQL SERVER server does not support this method of logging in, an error will occur.
You can log in with the user name and password of SQL SERVER, such as:
"Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=database name; Data Source=192.168.0.1;User ID=sa;Password=Password"
*************************** ************************
Integrated Security - or - Trusted_Connection 'false' When it is false , the user ID and password will be specified in the connection.When it is true , the current Windows account credentials will be used for authentication. Recognizable values are true, false, yes, no and the equivalent of true sspi (strongly recommended).
******************************************* ******
ADO.net Database connection methods in
System.Data.SqlClient.SqlConnection
Some commonly used Connection string (C# code):
Now let’s briefly describe some relevant insights......
****************** *********************************
What is the difference between initial catalog and database
Initial Catalog ;DataBase: There is actually no difference between the two but the name is different, as if the real name of a human being is the same as the previous name..Can call you.
********************************************
Integrated Security=SSPI This means to log in to the SQL SERVER server as the current WINDOWS system user.If the SQL SERVER server does not support this method of logging in, an error will occur.
You can log in with the user name and password of SQL SERVER, such as:
"Provider=SQLOLEDB.1;Persist Security Info=False;Initial Catalog=database name; Data Source=192.168.0.1;User ID=sa;Password=Password"
*************************** ************************
Integrated Security - or - Trusted_Connection 'false' When it is false , the user ID and password will be specified in the connection.When it is true , the current Windows account credentials will be used for authentication. Recognizable values are true, false, yes, no and the equivalent of true sspi (strongly recommended).
******************************************* ******
ADO.net Database connection methods in
System.Data.SqlClient.SqlConnection
Some commonly used Connection string (C# code):
The code is as follows: div>
SqlConnection conn = new SqlConnection( "Server=(local);Integrated Security=SSPI;database=Pubs");
SqlConnection conn = new SqlConnection("server=(local)\NetSDK;database=pubs;Integrated   ; Security=SSPI");
SqlConnection conn = new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;");
SqlConnection conn = new SqlConnection(" data source=(loc al);initial catalog=xr;integrated security=SSPI;
persist security info=False;workstation id=XURUI;packet size=4096; ");
SqlConnection myConn = new System.Data.SqlClient.SqlConnection("Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=mySQLServer");
SqlConnection conn = new SqlConnection( "   ; uid=sa;pwd=passwords;initial catalog=pubs;data source=127.0.0.1;Connect Timeout=900");
SqlConnection conn = new SqlConnection( "Server=(local);Integrated Security=SSPI;database=Pubs");
SqlConnection conn = new SqlConnection("server=(local)\NetSDK;database=pubs;Integrated   ; Security=SSPI");
SqlConnection conn = new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=Northwind;");
SqlConnection conn = new SqlConnection(" data source=(loc al);initial catalog=xr;integrated security=SSPI;
persist security info=False;workstation id=XURUI;packet size=4096; ");
SqlConnection myConn = new System.Data.SqlClient.SqlConnection("Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=mySQLServer");
SqlConnection conn = new SqlConnection( "   ; uid=sa;pwd=passwords;initial catalog=pubs;data source=127.0.0.1;Connect Timeout=900");
Tags
Leave a Reply
+
0 Comments