BUG: Pass Database Object to 16-Bit OLE Server Causes 80010104 (149033)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition, 16-bit, for Windows 4.0
- Microsoft Visual Basic Enterprise Edition, 16-bit, for Windows 4.0
This article was previously published under Q149033 SYMPTOMS
Attempting to pass a DAO Database object to a 16-bit OLE server created
with Visual Basic 4.0 16-bit can cause error -2147417852 (80010104) with
early-binding, or run-time error 13 - Type Mismatch when using late-
binding. This error is caused when the parameter list in the OLE server for
the function or subroutine has an element declared As Database.
STATUS
Microsoft has confirmed this to be an issue in the Microsoft products
listed at the beginning of this article.
WORKAROUND
Declare the element of the parameter list As Object instead of As Database.
For example, instead of using
Public Sub PassDB(MyDB As Database)
use:
Public Sub PassDB(MyDB As Object)
All code in the body of the procedure or function that takes the database
object can be written in the same way as if the parameter had been passed
As database. Note that the As Database will work correctly with Visual
Basic 4.0 32-bit and Jet 3.0.
Modification Type: | Minor | Last Reviewed: | 1/8/2003 |
---|
Keywords: | kbbug KB149033 |
---|
|