⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cicsospobject.cls

📁 IBM 开发的easy cics通讯相关的源代码
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "CicsOSPObject"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit
Implements OLEDBSimpleProvider
Dim MyOSPArray()
Dim RowCount%, ColCount%
Dim colListeners As New Collection
Dim osp1 As OLEDBSimpleProviderListener
Public oEc As EasyCics.App

Public Sub LoadData()
Dim Row As Integer, Col As Integer

        oEc.RsOpen
        RowCount = oEc.RsGetRowNum
        ColCount = oEc.RsGetColNum
        ReDim MyOSPArray(RowCount + 1, ColCount + 1)
        
For Col = 1 To ColCount
        MyOSPArray(Row, Col) = "Col" + Str(Col)
Next Col
        
For Row = 1 To RowCount
        oEc.RsFetchRow
 For Col = 1 To ColCount
        MyOSPArray(Row, Col) = oEc.RsGetCol(Col)
 Next Col
Next Row

End Sub

Private Sub OLEDBSimpleProvider_addOLEDBSimpleProviderListener(ByVal pospIListener As OLEDBSimpleProviderListener)

If Not (pospIListener Is Nothing) Then
        Set osp1 = pospIListener
        colListeners.Add osp1
End If

End Sub

Private Function OLEDBSimpleProvider_deleteRows(ByVal iRow As Long, ByVal cRows As Long) As Long
'
End Function

Private Function OLEDBSimpleProvider_find(ByVal iRowStart As Long, ByVal iColumn As Long, ByVal val As Variant, ByVal findFlags As OSPFIND, ByVal compType As OSPCOMP) As Long
'
End Function

Private Function OLEDBSimpleProvider_getColumnCount() As Long
        OLEDBSimpleProvider_getColumnCount = ColCount
End Function

Private Function OLEDBSimpleProvider_getEstimatedRows() As Long
        OLEDBSimpleProvider_getEstimatedRows = RowCount
End Function

Private Function OLEDBSimpleProvider_getLocale() As String
        OLEDBSimpleProvider_getLocale = ""
End Function

Private Function OLEDBSimpleProvider_getRowCount() As Long
        OLEDBSimpleProvider_getRowCount = RowCount
End Function

Private Function OLEDBSimpleProvider_getRWStatus(ByVal iRow As Long, ByVal iColumn As Long) As OSPRW
        OLEDBSimpleProvider_getRWStatus = OSPRW_READONLY
End Function

Private Function OLEDBSimpleProvider_getVariant(ByVal iRow As Long, ByVal iColumn As Long, ByVal format As OSPFORMAT) As Variant
        OLEDBSimpleProvider_getVariant = MyOSPArray(iRow, iColumn)
End Function

Private Function OLEDBSimpleProvider_insertRows(ByVal iRow As Long, ByVal cRows As Long) As Long
'
End Function

Private Function OLEDBSimpleProvider_isAsync() As Long
        OLEDBSimpleProvider_isAsync = False
End Function

Private Sub OLEDBSimpleProvider_removeOLEDBSimpleProviderListener(ByVal pospIListener As OLEDBSimpleProviderListener)
Dim listener As OLEDBSimpleProviderListener
Dim i As Integer

For i = 1 To colListeners.Count
 If colListeners(i) Is pospIListener Then
        colListeners.Remove i
 End If
Next i

End Sub

Private Sub OLEDBSimpleProvider_setVariant(ByVal iRow As Long, ByVal iColumn As Long, ByVal format As OSPFORMAT, ByVal Var As Variant)
'
End Sub

Private Sub OLEDBSimpleProvider_stopTransfer()

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -