You work as an application developer at Contoso.co...
单选题

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?()

发布日期:2020-04-10

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);

热门试题

热门资讯

    暂无相关推荐~

分享给好友

分享到朋友圈

取消

使用浏览器的分享功能,把这篇文章分享出去

确定