Bug #90589 | DbDataAdapter adapter = dbProviderFactory.CreateDataAdapter() adapter is null | ||
---|---|---|---|
Submitted: | 24 Apr 2018 3:54 | Modified: | 30 Jul 2018 0:53 |
Reporter: | gao haidong | Email Updates: | |
Status: | Duplicate | Impact on me: | |
Category: | Connector / NET | Severity: | S3 (Non-critical) |
Version: | 8.0.12 | OS: | Windows |
Assigned to: | CPU Architecture: | Any |
[24 Apr 2018 3:54]
gao haidong
[24 Apr 2018 9:55]
Chiranjeevi Battula
Hello ago haidong, Thank you for the bug report. Could you please provide repeatable test case (exact steps/sample project, screenshot etc. - please make it as private if you prefer) to confirm this issue at our end? Thanks, Chiranjeevi.
[25 Apr 2018 13:44]
Bradley Grainger
Duplicate of bug #88660.
[26 Apr 2018 5:53]
gao haidong
#if !NETSTANDARD1_6 /// <summary> /// Returns a strongly typed <see cref="DbDataAdapter"/> instance. /// </summary> /// <returns>A new strongly typed instance of <b>DbDataAdapter</b>. </returns> public override DbDataAdapter CreateDataAdapter() { return new MySqlDataAdapter(); } /// <summary> /// Returns a strongly typed <see cref="DbCommandBuilder"/> instance. /// </summary> /// <returns>A new strongly typed instance of <b>DbCommandBuilder</b>.</returns> public override DbCommandBuilder CreateCommandBuilder() { return new MySqlCommandBuilder(); } /// <summary> /// Returns true if a <b>MySqlDataSourceEnumerator</b> can be created; /// otherwise false. /// </summary> public override bool CanCreateDataSourceEnumerator { get { return false; } } #endif
[26 Apr 2018 6:48]
gao haidong
adapter is null demo
Attachment: EnterpriseLibrary.Test.MySql.rar (application/octet-stream, text), 209.43 KiB.
[26 Apr 2018 6:53]
gao haidong
static void Main(string[] args) { TestMySql(); } private static void TestMySql() { const string sqlCmd = @"select * from City "; DatabaseFactory.SetDatabaseProviderFactory(new DatabaseProviderFactory(new SystemConfigurationSource(false).GetSection), false); Database db = DatabaseFactory.CreateDatabase("BizDbMySql"); using (DbCommand cmd = db.GetSqlStringCommand(sqlCmd)) { try { db.ExecuteDataSet(cmd); } catch (Exception ex) { throw; } } }
[26 Apr 2018 6:54]
gao haidong
adapter is null test
Attachment: EnterpriseLibrary.Test.MySql.rar (application/octet-stream, text), 210.31 KiB.
[26 Apr 2018 10:59]
Chiranjeevi Battula
Hello gao haidong, Thank you for the feedback. This is most likely duplicate of Bug #88660, please see Bug #88660 Thanks, Chiranjeevi.
[30 Jul 2018 0:53]
gao haidong
这个问题不打算解决吗