Cannot convert type DbCommand to OracleCommand

Cannot convert type DbCommand to OracleCommand

Postby bzhou » Wed 16 Feb 2011 21:34

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.
bzhou
 
Posts: 2
Joined: Wed 16 Feb 2011 20:37

Postby StanislavK » Thu 17 Feb 2011 14:08

Thank you for your suggestion, we will consider documenting behaviour and interface differences between dotConnect for Oracle and ODP.NET. We will post here when any new information is available.
StanislavK
Devart Team
 
Posts: 1710
Joined: Thu 03 Dec 2009 10:48


Return to dotConnect for Oracle