Other 70-561 Exams :

70-561 Exam

TS: MS .NET Framework 3.5, ADO.NET Application Development

  • Exam Number/Code : 70-561
  • Exam Name : TS: MS .NET Framework 3.5, ADO.NET Application Development
  • Questions and Answers : 170 Q&As
  • Update Time: 2011-03-30
  • Price: $ 115.00 $ 99.00

Free 70-561 Demo Download

pass999.info offers free demo for TS 70-561 exam (TS: MS .NET Framework 3.5, ADO.NET Application Development). You can check out the interface, question quality and usability of our practice exams before you decide to buy it. We are the only one site can offer demo for almost all products.

Download 70-561 Exam Testing Engine


70-561 Exam Description

It is well known that latest 70-561 exam test is the hot exam of Microsoft certification. pass999.info offer you all the Q&A of the 70-561 real test . It is the examination of the perfect combination and it will help you pass 70-561 exam at the first time!

 
 
Exam : Microsoft 70-561
Title : TS: MS .NET Framework 3.5, ADO.NET Application Development


1. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.
You need to separate the security-related exceptions from the other exceptions for database operations at run time.
Which code segment should you use?
A. catch (System.Security.SecurityException ex)
{
//Handle all database security related exceptions.
}
B. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Class.ToString() == "14") {
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
C. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Number == 14){
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
D. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Message.Contains("Security")){
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
Answer: B

2. You create an application by using the Microsoft .NET Framework 5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.
The application throws an exception when the SQL Connection object is used.
You need to handle the exception.
Which code segment should you use?
A. try
{
if(null!=conn)
conn.Close();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null==conn)
conn.Open();
}
B. try
{
conn.Close();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null!=conn)
conn.Open();
}
C. try
{
conn.Open();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null!=conn)
conn.Close();
}
D. try
{
conn.Open();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null==conn)
conn.Close();
}
Answer: C

3. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
You need to ensure that the application can connect to any type of database.
What should you do?
A. Set the database driver name in the connection string of the application, and then create the connection object in the following manner.
Dim connection As DbConnection = _ New OdbcConnection(connectionString)
B. Set the database provider name in the connection string of the application, and then create the connection object in the following manner.
Dim connection As DbConnection = _ New OleDbConnection(connectionString)
C. Create the connection object in the following manner.
Dim factory As DbProviderFactory = _ DbProviderFactories.GetFactory("System.Data.Odbc")
Dim connection As DbConnection = _ factory.CreateConnection()
D. Create the connection object in the following manner.
Dim factory As DbProviderFactory = _ DbProviderFactories.GetFactory(databaseProviderName)
Dim connection As DbConnection = factory.CreateConnection()
Answer: D

4. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The application connects to a Microsoft SQL Server 2005 database.
The application throws an exception when the SQL Connection object is used.
You need to handle the exception.
Which code segment should you use?
A. Try
If conn IsNot Nothing Then
conn.Close()
' code for the query
End If
Catch ex As Exception
' handle exception
Finally
If conn Is Nothing Then
conn.Open()
End If
End Try
B. Try
' code for the query
conn.Close()
Catch ex As Exception
' handle exception
Finally
If conn IsNot Nothing Then
conn.Open()
End If
End Try
C. Try
' code for the query
conn.Open()
Catch ex As Exception
' handle exception
Finally
If conn IsNot Nothing Then
conn.Close()
End If
End Try
D. Try
' code for the query
conn.Open()
Catch ex As Exception
' handle exception
Finally
If conn Is Nothing Then
conn.Close()
End If
End Try
Answer: C

5. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
You need to ensure that the application can connect to any type of database.
What should you do?
A. Set the database driver name in the connection string of the application, and then create the connection object in the following manner.
DbConnection connection = new OdbcConnection(connectionString);
B. Set the database provider name in the connection string of the application, and then create the connection object in the following manner.
DbConnection connection = new OleDbConnection(connectionString);
C. Create the connection object in the following manner.
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.Odbc");
DbConnection connection = factory.CreateConnection();
D. Create the connection object in the following manner.
DbProviderFactory factory = DbProviderFactories.GetFactory(databaseProviderName);
DbConnection connection = factory.CreateConnection();
Answer: D

What's pass999.info and what pass999.info can do?

pass999.info provides high quality IT exam practice questions and answers. Especially, Cisco CCNA CCDA CCNP CCIE, Checkpoint CCSE, CompTIA A+ Network+ certification practice exams and so on. We promise that you can pass any IT exam at the first try using pass999.info Testing Engine, or else give you a FULL REFUND. In pass999.info, you also can find latest exam releases about real certification exam resources from most famous IT companies, and we recommend some hot exams for you.

About Microsoft 70-561 exam

There are many ways to prepare for your 70-561 Certification Exam. pass999.info provides the most reliable training tools to prepare for your next 70-561 Certification Exam. Our 70-561 Certification Study Material includes 70-561 test questions, 70-561 practice exam, 70-561 Practice Testing Software, 70-561 Audio Learning and Preparation Labs. We will meet the needs of all about IT certification in pass999.info.

The 70-561 test questions give you possibility to work in any country of the world because they are acknowledged in all countries equally. This pass999.info 70-561 torrent certificate helps not only to improve your knowledge and skills, but it also helps your career, gives a possibility for qualified usage of pass999.info 70-561 exam products under different conditions.

Once you purchase our 70-561 PDF,we will offer you the best service.After you purchase we will offer free update in time for 90 days.No matter any questions you have we will help you solve it. And in 3 weeks we will offer you free updates,so please pay attention our site at all times.