SQL Server 2000 is installed in Windows Server 2003 of the domain controller. the SQL Server server name is server2006 and the database name is database2006.
The code used for SQL Server Authentication and debugging is as follows:
Sqlconnection SC = new sqlconnection ();
SC. connectionstring = "uid = sa; Pwd = 123; database = database2006; server = server2006 ";
SC. open ();
If SQL server adopts Windows authentication, how can I connect to SQL server.
Net_lover (Chapter E of Mencius) on the first floor ])The score is 0 at 22:04:42.
"Provider = sqloledb; Data Source = server2006; initial catalog = database2006; Integrated Security = sspi;" Top
Net_lover (Chapter E of Mencius) on the second floor ])The score is returned at 22:05:42.
40
"Data Source = server2006; initial catalog = database2006; Integrated Security = sspi ;"
-Or-
"Server = server2006; database = database2006; trusted_connection = true ;"