J-Integra and ADO Disconnected Recordsets
Using disconnected Recordsets in DCOM mode is not supported by J-Integra's DCOM mode. For example, you may one of these error messages below.
- AutomationException: 0x800a0e78 - Operation is not allowed when the object is closed. in 'ADODB.Recordset'
For instance, if you have a Java client accessing VB program, the VB functionGetConnectedRecordset() can be successfully invoked from Java but the VB function GetDisconnectedRecordset() will fail.
Public Function GetConnectedRecordset() As ADODB.Recordset
Dim c As ADODB.Connection
Set c = New Connection
c.Open "driver=Microsoft Access Driver (*.mdb);dbq=C:\\pure\\products.mdb", , , -1
Set GetRecordset = c.Execute("SELECT * FROM Products", , -1)
Public Function GetDisconnectedRecordset() As ADODB.Recordset
Dim rs As New ADODB.Recordset
Set GetRecordset = rs
J-Integra does not support custom-marshalled objects (object references that are passed by value instead of by reference) in DCOM mode. Disconnected Recordsets require custom-marshalling and a special COM object to be loaded into the client to decode the recordset.
Disconnected Recordsets work fine in J-Integra's native mode. In Native mode, the J-Integra runtime interacts using standard COM calls, rather than talking the DCOM protocol from pure Java.
If the environment does not allow for native mode to be used, another option is to create a COM wrapper around the code that uses Recordsets. For example, you could create a Visual Basic COM component which uses disconnected Recordsets to retrieve data. Your Java application could then use J-Integra to access this VB COM component and get the data it requires.