Accessing-Data-with-Microsoft-NET-Framework-Csharp-(70-516-CSharp).pdf

This preview shows page 1 - 4 out of 9 pages.

70-516-CSharpMicrosoftAccessing Data with Microsoft .NET Framework
QUESTION:77Which will return all node of an XDocument?A
QUESTION:78Which one of these samples it the correct way to close the connection using CommandBehaviorA. SqlDataReader rdr = new SqlDataReader();string sql = @"sql statement";SqlConnection conn = connection.GetConnection();SqlCommand cmd = new SqlCommand(sql, conn);SqlDataReaderrdr=cmd.ExecuteReader(CommandBehavior.CloseConnection);Console.WriteLine("{0}", rdr);B. SqlDataReader rdr = new SqlDataReader();string sql = @"sql statement";SqlConnection conn = connection.GetConnection();SqlCommand cmd = new SqlCommand(sql, conn);SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);rdr.close(); Console.WriteLine("{0}", rdr);C. SqlDataReader rdr = new SqlDataReader();string sql = @"sql statement";SqlConnection conn = connection.GetConnection();SqlCommand cmd = new SqlCommand(sql, conn);SqlDataReader rdr = cmd.ExecuteReader(CommandBehavior.CloseConnection);conn.close(); Console.WriteLine("{0}", rdr);D. using (SqlDataReader rdr = new SqlDataReader()){string sql = @"sql statement";SqlConnectionconn=connection.GetConnection();SqlCommandcmdSqlCommand(sql, conn);SqlDataReaderrdr=cmd.ExecuteReader(CommandBehavior.CloseConnection);Console.WriteLine("{0}", rdr);=new47
}Btopass

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 9 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
Mohammad Alizadeh
Tags
NET Framework, ADO NET, Microsoft SQL Server, Microsoft Visual Studio

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture