Article ID: 309047 - View products that this article applies to.
This article was previously published under Q309047
For a Microsoft Visual Basic .NET version of this article, see 308499
Caution ADO and ADO MD have not been fully tested in a Microsoft .NET Framework environment. They may cause intermittent issues, especially in service-based applications or in multithreaded applications. The techniques that are discussed in this article should only be used as a temporary measure during migration to ADO.NET. You should only use these techniques after you have conducted complete testing to make sure that there are no compatibility issues. Any issues that are caused by using ADO or ADO MD in this manner are unsupported. For more information, see the following article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/840667/ )You receive unexpected errors when using ADO and ADO MD in a .NET Framework application
When you set a property value on an ActiveX Data Objects (ADO) object to a string value, you may encounter the following exception:
Unhandled Exception: System.Runtime.InteropServices.COMException (0x800A0BB9): Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
When you use ADO in the Microsoft .NET Framework with Component Object Model (COM) interop, ADO properties that formerly accepted either object references or string values now only support object references. As a result, when you try to set a property to a string value, an exception is thrown.
To set an ADO property that accepts either an object or a string to a string value in the .NET Framework, use the let_ methods that COM interop generates for imported assemblies. For sample code that demonstrates this, refer to the "More Information" section.
Steps to Reproduce the Behavior