This section discusses COM and ENUM UDT
s.
The supported COM data types for member variables in a struct are:
A COM User Defined Type (UDT
, COM type VT_RECORD
) is mapped to a TIBCO ActiveEnterprise class. For example:
COM Data Type
|
Unscoped TIBCO ActiveEnterprise
Data Type Name |
Scoped TIBCO ActiveEnterprise Data Type Name
|
---|---|---|
The user-defined type ENUM
s are mapped as i4 in the repository.
COM Data Type
|
Unscoped TIBCO ActiveEnterprise
Data Type Name |
Scoped ActiveEnterprise Data Type Name
|
---|---|---|
The adapter accepts recordset pointers as method parameters and does the intrinsic conversion to/from a sequence of ActiveEnterprise classes to be in sync with the TIBCO Adapter SDK data types. However, the adapter does not support any embedded pointers as data types. Only the recordset pointers and ADO connection object pointers are supported for the current release, and not IDispatch
. For example, in Visual Basic, a recordset can be treated as an object in method parameters. However, in the type library, the object is represented as an IDispatch
pointer. Such scenarios, where objects are used in place of the recordset, are not supported. The recordset should be explicitly declared as ADODB.Recordset
as method parameters for the adapter to work. The Import Metadata
option on the Import Schema
tab in TIBCO Designer will accept recordset pointers as method parameters, both in
and out
types. Among the different types of recordset available in the ADO libraries, only the snapshot recordset is supported, which corresponds to ODBC static cursors.
As all data contained in the recordset object essentially needs to be transported over the TIBCO messaging transport by the adapter, the recordset object implicitly or explicitly cannot contain data types that are not supported by the adapter. If the data type of any field contained in the recordset object is different from the data types supported by the adapter, the adapter will display an error. For example, if the recordset gets the data from an underlying SQL table where the data type for a column is binary
, it cannot be transported by the adapter over the TIBCO messaging transport. The adapter displays an exception if any data types other than the supported ones are used in the recordset data object.
A list of mapping for data types in different layers is provided:
All the data types listed in the table are Microsoft SQL server specific. Other data providers might have slight variations on the data types and the mapping to ADO equivalent might vary depending on the provider.
The adapter accepts ADO Connection Object pointers as method parameters and converts to and from ActiveEnterprise connclass
classes to stay in sync with the TIBCO Adapter SDK data types. Such objects can only be used by TIBCO ActiveEnterprise clients (like TIBCO BusinessWorks) that want to utilize the COM Server methods using ADO Connection Objects. The TIBCO ActiveEnterprise clients will typically use recordset parameters provided in the other COM Server methods. All the requirements described for recordset parameters in the previous section are applicable. See the examples for more information.
Note that the adapter does not support any embedded pointers as data types; only recordset pointers and ADO Connection pointers are supported for the current release, and not IDispatch. For example, in Visual Basic, an ADO Connection Object can be treated as an object in method parameters. However, in the type library, the object is represented as an IDispatch pointer. Such scenarios, where objects are used in place of the ADO Connection object, are not supported. The ADO Connection object should be explicitly declared as ADODB.Connection
as method parameters for the adapter to work.
The Import Metadata
option on the Import Schema
tab in TIBCO Designer will accept ADO Connection Object pointers as method parameters, both in
and out
types. The COM server should provide a method which has the Connection object as [out]
or [out, retval]
. Other COM server methods should have the Connection object as the [in]
parameter. As a best practice, the COM server should also provide a method to release the ADO Connection; this method will also have the ADO Connection object as an [in]
parameter.
COM Data Type
|
Unscoped TIBCO ActiveEnterprise Data Type Name
|
Scoped TIBCO ActiveEnterprise Data Type Name
|
---|---|---|
VT_PTR
|
connclass
|
/tibco/public/class/ae/connclass
|
TIBCO Adapter™ for COM User’s Guide Software Release 5.3, September 2005 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |