I have some base classes that rely on DbProviderFactory.
Factory = DbProviderFactories.GetFactory(getDataProviderName());
DbCommand cmd = Factory.CreateCommand();
In subclass, I need to cast them to OracleCommand,
((OracleCommand)cmd).BindByName = true;
then I got compile error: Cannot convert type 'System.Data.Common.DbCommand' to 'Devart.Data.Oracle.OracleCommand'
It works well when I use Oracle's ODP.net driver, any solutions for Devart's driver?
I also notice that BindByName should be ParameterCheck and PassParametersByName. I wonder if Devart has migration guide.
Thanks
Edit: my bad, I only reference to Devart.Data.Oracle.dll, I forgot Devart.Data.dll
But the question about migration guiding document is still there, I just figured out, I cannot use ArrayBindCount in ArrayBinding, I have to use ExecuteArray(ArrayBindCount ) instead.
Cannot convert type DbCommand to OracleCommand
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48