PRB: 80004005 Unspecified Error When Passing Disconnected Recordset from MTS to ASP (237536)
The information in this article applies to:
- Microsoft Data Access Components 2.0
- Microsoft Data Access Components 2.1
- Microsoft Data Access Components 2.1 (GA)
- Microsoft Data Access Components 2.1 SP1
- Microsoft Data Access Components 2.1 SP2
- Microsoft Data Access Components 2.5
- Microsoft Data Access Components 2.6
- Microsoft Data Access Components 2.7
- Microsoft Internet Information Server 4.0
- Microsoft Internet Information Server 5.0
- Microsoft Active Server Pages
- Microsoft Transaction Server 2.0
- Microsoft COM+ 1.0
This article was previously published under Q237536 SYMPTOMS
When passing a disconnected ActiveX Date Objects (ADO) Recordset from a Component Object Model (COM) component inside a Microsoft Transaction Server (MTS) Server Package/COM+ Application to Active Server Pages (ASP), you may receive one of the following error messages:
error '80004005'
Unspecified error
/xxx.asp, line x
-or- (with ASP error handling)
Error Number : 13 - Source : Microsoft VBScript runtime error - Type mismatch
-or- (after multiple tries)
Microsoft VBScript runtime error '800a0007'
Out of memory: 'obj.TestRS'
/xxx.asp, line x CAUSE
An error occurs because the fields in the disconnected recordset have been defined as adVariant, and ADO cannot marshal certain data types within adVariant across process boundaries (in this case, between InetInfo and MTS or COM+). ADO marshaling cannot convert data of the following types when the field type is set to adVariant:
DBTYPE_BSTR = 8,
DBTYPE_IDISPATCH = 9,
DBTYPE_VARIANT = 12,
DBTYPE_IUNKNOWN = 13,
DBTYPE_ARRAY = 0x2000,
DBTYPE_BYREF = 0x4000,
Please note that the following types are not to be used for Automation when using adVariant, as documented (search for the Topic "Type Indicators" in
the Microsoft Data Access Components 2.5 SDK - OLE DB Programmer's Reference in the MSDN library at http://msdn.microsoft.com/library/psdk/dasdk/olpr0vu6.htm):
// The following values exactly match VARENUM
// in Automation but cannot be used in VARIANT.
DBTYPE_I8 = 20,
DBTYPE_UI8 = 21,
DBTYPE_GUID = 72,
DBTYPE_VECTOR = 0x1000,
DBTYPE_FILETIME = 64,
DBTYPE_RESERVED = 0x8000,
RESOLUTION
When trying to pass values of the types mentioned above, such as strings (BSTR), you must declare those field types explicitly instead of using adVariant.
Example
rs.Fields.Append "ID", adVariant 'this works since it is an Integer
rs.Fields.Append "fname", adVarChar, 50
rs.Fields.Append "lname", adVarChar, 50
Modification Type: | Minor | Last Reviewed: | 7/16/2004 |
---|
Keywords: | kbCodeSnippet kbDatabase kberrmsg kbprb KB237536 |
---|
|