Article ID: 907742 - View products that this article applies to.
Bug #: 398546 (SQLBUDT)
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 use a Microsoft ActiveX Data Objects (ADO) object in a Microsoft ASP.NET-based application to connect to a Microsoft SQL Server database, you may receive the following error message:
For example, this problem occurs when you create a new instance of an ADODB.Connection object or an ADODB.Recordset object. This problem also occurs when you pass a variable of type ADODB to a function.
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30002: Type 'ADODB.Connection' is not defined.
Note In Visual Studio 2005, when you add a reference to the ADODB Primary Interop Assembly (PIA), Visual Studio 2005 automatically updates the Web.config file to insert the reference to the ADODB PIA. Therefore, this problem will not occur.
This problem may occur if the application does not explicitly reference the ADODB PIA. You must explicitly reference the ADODB PIA in the Web.config file so that the ASP.NET-based application can correctly compile the .aspx pages.
To work around this problem, you can modify the Web.config file for the server or you can modify the local copy of the Web.config file that is in the virtual directory where the .aspx pages are located.
To modify the Web.config file, follow these steps:
Article ID: 907742 - Last Review: November 28, 2007 - Revision: 2.1
Contact us for more help
Connect with Answer Desk for expert help.