CimDbap.SubmitTableOLEDBRequest (method)

Gets CIMPLICITY Database Logger OLEDB connection information for a CIMPLICITY Logging table.
Syntax: object.SubmitTableOLEDBRequest project, table_id, pResponse, timeout
Parameters:
project As String - String containing the CIMPLICITY project.
table_id As String - String containing the CIMPLICITY Logging table.
pResponse As CimDbapTableOLEDBResponse - A CimDbapTableOLEDBResponse object, which will be populated with the DSN configuration data.
Optional timeout As long - An optional value defining how many milliseconds to attempt to make a connection with the CIMPLICITY project and retrieve the data. If the specified timeout elapses before successfully connecting and retrieving the data, then an error will be returned indicating that the timeout period has elapsed. The default value is to wait indefinitely, however it is recommended that a timeout value be used to avoid indefinitely hanging your application.
Description: Use this method to retrieve the OLE DB connection information required to make a connection to the database where the CIMPLICITY Logging table exists.



Example:

Sub Main()
 
Dim oCimDbap As Object
Dim oCimDbapTableOLEDBResponse As Object
Dim oADORecordset As Object
 
Set oCimDbap = CreateObject("DbapDisp.CimDbap")
Set oCimDbapTableOLEDBResponse = CreateObject("DbapDisp.CimDbapTableOLEDBResponse")
 
'Create an ADO Recordset object
Set oADORecordset = CreateObject("ADODB.Recordset")
 
'Submit request. Timeout of 30 seconds
oCimDbap.SubmitTableOLEDBRequest "VCRNWM", "DATA_LOG", oCimDbapTableOLEDBResponse, 30000
If oCimDbapTableOLEDBResponse.TableType = 0 Then
MsgBox "Table name is invalid"
Exit Sub
End If
sql$ = "Select TOP 100 * from " & oCimDbapTableOLEDBResponse.TableName
oADORecordset.CursorLocation = 3 'adUseClient
oADORecordset.Open sql$, oCimDbapTableOLEDBResponse.ConnectString
MsgBox oADORecordset.RecordCount
 
End Sub