You work as an application developer at Contoso.com. You use

题目
单选题
You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. You want to make sure that the application is operative to any type of database.   What should you do?()
A

 Set the database driver name in the connection string of the application, and then the connection object as follows: DbConnection connection = new OdbcConnection(connectionString);

B

 Create the connection object as follows: DbProviderFactory factoryDbProviderFactories.GetFactory(databaseProviderName); DbConnection connection =factory.CreateConnection();

C

 Create the connection object as follows: DbProviderFactory factory = DbProviderFactories.GetFactory(System.Data.Odbc); DbConnection connection = factory.CreateConnection();

D

 Set the database driver name in the connection string of the application, and then the connection object as follows:DbConnection connection = new OleDbConnection(connectionString);

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

You work as an application developer at Certkiller .com. Certkiller .com has asked you to develop an application that monitors and controls the activities of a Windows service.You need to use the appropriate class to meet Certkiller .com’s requirements. What should you do?()

  • A、 Use the ServiceBase class.
  • B、 Use the ServiceInstaller class.
  • C、 Use the ServiceManager class.
  • D、 Use the ServiceController class.

正确答案:D

第2题:

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform.  You are creating an ASP.NET Web application using .NET Framework 4.0. The Web application comprises a class named Employee with properties named as First Name, Last Name, and Age. You add a Web page in which you get a list of Employee objects and display those objects in a GridView control. You are required to add code so that the GridView row is highlighted in red color if the age of the employee is less than 21 years.  What will you do to accomplish this?()

  • A、Use the RowCommand event of the GridView control.
  • B、Use the SelectedlndexChanged event of the GridView control.
  • C、Use the RowDataBound event of the GridView control.
  • D、Use the RowEditing event of the GridView control.
  • E、Use the RowUpdated event of the GridView control.

正确答案:C

第3题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You host the Web application in Microsoft Internet Information Services (IIS) 6.0. You browse theapplication and receive the following error message:  Server Application Unavailable  The web application you are attempting to access on this web server is currently unavailable.Please hit the "Refresh" button in your web browser to retry your request.  You view the Application event log and discover the following message:  It is not possible to run two different versions of ASP.NET in the same IIS process. Please use theIIS Administration Tool to reconfigure your server to run the application in a separate process.  To ensure productivity you need to solve this problem as quick as possible.  What should you do?()

  • A、You should change the IIS isolation mode.
  • B、You should assign the application to another application pool.
  • C、You should configure all applications that are part of your application's application pool in orderto use the same version of ASP.NET.
  • D、You should run the Aspnet_regiis.exe Tool.
  • E、You should restart the application pool that hosts the application.

正确答案:B,C

第4题:

You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. You want to make sure that the application is operative to any type of database.   What should you do?()

  • A、 Set the database driver name in the connection string of the application, and then the connection object as follows: DbConnection connection = new OdbcConnection(connectionString);
  • B、 Create the connection object as follows: DbProviderFactory factoryDbProviderFactories.GetFactory(databaseProviderName); DbConnection connection =factory.CreateConnection();
  • C、 Create the connection object as follows: DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.Odbc"); DbConnection connection = factory.CreateConnection();
  • D、 Set the database driver name in the connection string of the application, and then the connection object as follows:DbConnection connection = new OleDbConnection(connectionString);

正确答案:B

第5题:

You work as the application developer at Certkiller .com. Certkiller .com uses Visual Studio.NET 2005 as its application development platform. You are developing a Windows Service application. You need to change the security context in which the service runs. The service will be run in context of a non-privileged user on the local computer and present anonymous credentials to any remote server. You are required to set the Account property of the ServiceProcessInstaller class to specify the service account. What should you do?()

  • A、Use ServiceAccount.User.
  • B、Use ServiceAccount.LocalService.
  • C、Use ServiceAccount.LocalSystem.
  • D、Use ServceAccount.NetworkService.

正确答案:B

第6题:

You work as an application developer at Contoso.com. You use Microsoft .NET Framework 3.5 and Microsoft ADO.NET to develop an application. The user name and password that is kept by the connection string is stored directly in the code of the application. You want to make sure that the password in the connection string is as protected.   What should you do? ()

  • A、 Add the connection string to the Settings.settings file.
  • B、 Add connection string to the Web.config file and use protected configuration.
  • C、 Use the TRUE setting in the Persist Security Info keyword.
  • D、 Use the FALSE setting in the Persist Security Info keyword

正确答案:B

第7题:

You work as an application developer at Certkiller .com. You have recently created an application domain for Certkiller .com. A few weeks later you are asked to retrieve information from this application domain, which is the current application domain. What can you do to achieve this objective?()

  • A、 Use the following code: AppDomain appInfo = ApplicationDomain.Current;
  • B、 Use the following code: AppDomain appInfo = AppDomain.CurrentDomain ();
  • C、 Use the following code: AppDomain appInfo = Thread.GetDomain ();
  • D、 Use the following code: AppDomain appInfo = MainThread.GetDomain ();

正确答案:B,C

第8题:

You work as a Web Developer at Certkiller.com. You are in the process of creating a Webapplication using Microsoft ASP.NET 3.5.  You create a folder named Dark in the App_Themes folder of the Web application. You also addfour skin files to this folder. You have to make sure that the controls on a page have their appearances overridden by the control definitions defined in the skin files. What should you do?  Which Page directive should you use?()

  • A、You should use the page directive: <%@ Page StyleSheetTheme="App_Themes.Dark"/>
  • B、You should use the page directive: <%@ Page Theme="App_Themes.Dark"/>
  • C、You should use the page directive: <%@ Page Theme="Dark"/>
  • D、You should use the page directive: <%@ Page StyleSheetTheme="Dark"/>

正确答案:C

第9题:

You work as an ASP.NET Web Application Developer for SomeCompany. The company uses Visual Studio .NET 2010 as its application development platform. You create an ASP.NET Web application using .NET Framework 4.0. The Web application connects to a SQL Server database. You use the ADO.NET Entity Framework to handle persistence-ignorant entities. You create an ObjectContext object named ObjContext. Subsequently, you change properties on numerous entities. You are required to save the changed entity values in the SQL Server database. Which of the following code segments will you use?()

  • A、ObjContext.SaveChanges(SaveOptions.DetectChangesBeforeSave);
  • B、ObjContext.SaveChanges(SaveOptions.AcceptAllChangesAfterSave);
  • C、ObjContext.SaveChanges(SaveOptions.All);
  • D、ObjContext.SaveChanges(SaveOptions.None);

正确答案:A

第10题:

You work as an application developer at Certkiller .com. You are required to dynamically load assemblies into an application domain. You are using the Load method of the AppDomain class. What types of files can you this use method for?()

  • A、 Library application files (.dll).
  • B、 All assembly files, no matter what there file extensions are.
  • C、 Application configuration files (.config).
  • D、 Standalone application files (.exe).

正确答案:B

更多相关问题