MCTS认证70-561(C++)考试题库由我们专业IT认证讲师及产品专家精心打造,包括了当前最新的全真的试题。题库的覆盖率在96%以上,考题随着认证厂商的动态变化而及时更新,确保考生能一次通过考试。
参加这门考试,首先必须了解相关的考题信息。
考试代号:70-561(C++)
认证名称:TS: MS .NET Framework 3.5, ADO.NET Application Development
版本号:V8.02
考题数量:85道
更新日期:2010-8-14
1. 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
2. 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
3. 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(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
如需下载更多的题库,可以登录killtest题库网。