• 2022-06-07
    下列ASP.NET语句 ( )正确地创建了一个与SQL Server数据库的连接。
    A: SqlConnection conn = new Connection("Data Source = localhost; Integrated Security = SSPI; Initial Catalog = myDB")
    B: SqlConnection conn = new SqlConnection("Data Source = localhost; Integrated Security = SSPI; Initial Catalog = myDB")
    C: SqlConnection conn = new SqlConnection(Data Source = localhost; Integrated Security = SSPI; Initial Catalog = myDB)
    D: SqlConnection conn = new OleDbConnection("Data Source = localhost; Integrated Security = SSPI; Initial Catalog = myDB")
  • 举一反三