Microsoft Knowledge Base Email Alertz

You receive a compiler error message when you call the Dispose(BooleanParameter) method of the SqlCeDataReader object in a SQL Server 2005 Mobile Edition project

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 912432 - Last Review: March 27, 2008 - Revision: 3.2

You receive a compiler error message when you call the Dispose(BooleanParameter) method of the SqlCeDataReader object in a SQL Server 2005 Compact Edition project or in a SQL Server 2005 Mobile Edition project

SYMPTOMS

In a Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) project or in a Microsoft SQL Server 2005 Mobile Edition (SQL Server Mobile Edition) project, you call the Dispose(BooleanParameter) method of the SqlCeDataReader object. When you do this, you receive the following compiler error message:
'System.Data.Common.DbDataReader.Dispose(bool)' is inaccessible due to its protection level
Note BooleanParameter is a placeholder for a parameter of the Boolean type that you pass to the Dispose method.

CAUSE

This problem occurs because the access modifier of the Dispose(BooleanParameter) method of the SqlCeDataReader object is set to Protected. You cannot call the method directly in runtime.

RESOLUTION

To resolve this problem, use the nonparameter version of the Dispose method of the SqlCeDataReader object.

MORE INFORMATION

For more information about the Dispose method, visit the following Microsoft Developer Network (MSDN) Web site:
http://msdn2.microsoft.com/en-us/library/fs2xkftw(vs.71).aspx (http://msdn2.microsoft.com/en-us/library/fs2xkftw(vs.71).aspx)

APPLIES TO
  • Microsoft SQL Server 2005 Compact Edition
  • Microsoft SQL Server 2005 Mobile Edition
Keywords: 
kbprb KB912432
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate