BUG: Error 0x800A02E0 "Cannot Save an Uninitialized Class" on Visual Basic Component (272490)
The information in this article applies to:
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Server 5.0
- Microsoft Active Server Pages
This article was previously published under Q272490 SYMPTOMS
When you create a Visual Basic ActiveX dynamic-link library (DLL) from Active Server Pages (ASP) or from another Microsoft Transaction Server component with CreateInstance and call a method on it that writes to a PropertyBag object, you may receive the following error message when you call the WriteProperty method on the PropertyBag:
Error Type:
SomeComponent (0x800A02E0)
Cannot save an uninitialized class. You must use the global InitProperties method to initialize the class, or load the class from a PropertyBag before trying to save it.
This problem does not occur when you create the component from Visual Basic with the New keyword.
CAUSE
This problem occurs because the IPersistStream::InitNew method is not called on the component that is saved. When the component is created from Visual Basic with New, the Visual Basic runtime calls InitNew for you.
RESOLUTION
To work around this problem, create the component through a factory component in Visual Basic so that Visual Basic creates the component and calls InitNew on the IPersistStreamInit interface.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. REFERENCESFor additional information, click the article number below
to view the article in the Microsoft Knowledge Base:
241896 PRB: Threading Issues with Visual Basic 6.0 ActiveX Components
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbbug kberrmsg kbnofix KB272490 |
---|
|