Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

Generic 'ADO' Connection and Query Tester

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PBWin/PBCC Generic 'ADO' Connection and Query Tester

    Operation:

    Code:
    C:\MyFolder> Start adodemo.exe commandfile
    DEMO PROGRAM CODE WITH INSTRUCTIONS
    Code:
    ' ADODEMO.BAS
    ' Demonstration of "generic" "SELECT " SQL statement use of function "ADOExecuteSelect"
    ' Date: 11-02-08
    ' 11-05-08      clean up comments; changes to ADOEXECUTESELECT.INC
    '               Fix bug in adoexecuteselect in column names.
    ' Author: Michael Mattias Racine WI
    ' Use and Distrubution: PLaced in public domain by author 11/5/08.
    ' Thanks to: Fred Harris for starter ADO program. Jose Roca for tips re using new IDISPINFO object
    ' Compilers: PB/CC version 5 or PB/WIn 9. Compiles and runs on either 'as is'
    ' USAGE from command line:
    '    C:\> Start  adodemo.exe commandfilename
    ' Program edits commandfilename for the strings QUERY= and CONNECT=, then executes the function "ADoExecuteSelect"
    '  which returns a filled dynamic string array.
    ' =========================================
    ' USEFUL/COMMON OLEDB Connection strings;
    ' Oracle: Provider=ORAOLEDB.Oracle;Data Source=<service name>;User ID=Xxxxxx;Password=xxxxx
    ' Jet/Access:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Testdata\ptmn\db\jet\ptmn.mdb;User Id=admin;Password=;
    ' MS EXCEL LProvider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
    '
    ' Others: http://www.connectionstrings.com
    ' See supplied test file "acommand.txt"
    ' ===============================================
    
    
    #COMPILE  EXE
    #COMPILER PBCC 5, PBWIN 9
    #DIM      ALL
    #TOOLS    OFF
    ' #DEBUG not on here, as I want a GPF immediately if I am corrupting memory.
    
    #INCLUDE "ADOEXECUTESELECT.INC" ' file created just for this demo
    '  this will incude #INCLUDE   "ADODB28DISP.INC"  ' regenerated with CC5 com browser "dispatch only"
    ' has to go this way due to the way some MACROs are generated by COM browser.
    
    #IF NOT %DEF(%VT_DECIMAL)
      %VT_DECIMAL = 14
    #ENDIF
    #IF NOT %DEF (%WINAPI)
       #INCLUDE   "Win32Api.inc"
    #ENDIF
    
    ' where progress info and data from select are deposited. FIle is opened with NOtePad at end.
    $RESULT_FILE  =  "ADODEMO_LOG.TXT"
    
    FUNCTION PBMAIN() AS LONG
    
        LOCAL sCmdFile AS STRING
        LOCAL sBuff AS STRING, sKEy AS STRING
        LOCAL sConnect AS STRING, sQuery AS STRING
        LOCAL hIn     AS LONG, iPos AS LONG
        LOCAL sRow() AS STRING, nRow AS LONG, nCol AS LONG, iRow AS LONG, iCol AS LONG
        LOCAL sErrMsg AS STRING
        LOCAL sResultFile AS STRING,hResult AS LONG
        LOCAL iRet AS LONG
    
        sResultFile =  $RESULT_FILE
    
        sCMDFile = TRIM$(COMMAND$)
    
        IF DIR$(sCmdFile) > "" THEN
            hIN =   FREEFILE
            OPEN    sCmdFile  FOR INPUT AS hIn
            WHILE NOT EOF(hIN)
                LINE INPUT #hIn, sBUFF
                ipos = INSTR (sBuff, "=")
                sKey = UCASE$(LEFT$(sBuff, iPos-1))
                SELECT CASE sKey
                    CASE "CONNECT"
                        sConnect = MID$(sBuff, iPos+1)
                    CASE "QUERY"
                        sQuery   = MID$(sBUff,iPos+1)
                END SELECT
            WEND
            CLOSE hIn
        ELSE
           ? USING$("Command file '&' not found", sCmdFile)
           GOTO   WinMainExit
        END IF
    
        IF LEN(sConnect) = 0 THEN
          ? "No 'CONNECT=' string found in command file"
          GOTO WinMainExit
        END IF
    
        IF LEN(sQuery) = 0 THEN
          ? "No 'QUERY=' string found in command file"
            GOTO WinMainExit
        END IF
    
        ' ------------------------
        ' START RESULT FILE HERE
        ' ------------------------
        hResult = FREEFILE
        OPEN      sResultFile FOR OUTPUT AS hResult
        PRINT #hResult, USING$ ("ADO Demo begins at & on &", TIME$, DATE$)
        PRINT #hResult, USING$ ("Connection string '&'", sConnect)
        PRINT #hResult, USING$ ("Query '&'", sQuery)
        PRINT #hResult,
    
    
        ' -------------------------------------
        ' Create array to hold query results
        ' ------------------------------------
        REDIM  sRow(0,0)
    
        CALL AdoExecuteSelect (BYVAL STRPTR(sConnect), BYVAL STRPTR(sQuery), sRow(), sErrMsg) TO iRet
    
        PRINT #hResult, USING$ ( "AdoExecuteSelect returns # &", iRet, IIF$(iRet, "ERROR", "SUCCESS"))
    
        IF ISTRUE iRet THEN
             PRINT #hResult, "ERROR MESSAGE:" & sErrMsg
        ELSE
             ncol = UBOUND(sRow,1)
             nRow = UBOUND(sRow,2)
             PRINT #hResult, USING$ ("QUery returned # columns and # rows", nCol, nRow)
             PRINT #hResult,
             PRINT #hResult, "COLUMN NAMES"
             FOR iCol = 1 TO nCol
                  PRINT #hResult, sRow(iCol, 0);
                  IF icol <> nCol THEN
                       PRINT #hResult, ",";
                  END IF
             NEXT
             PRINT #hresult,
    
             ' ---------------------------------------
             ' now show data, comma separated
             ' ---------------------------------------
             FOR iRow = 1 TO nRow
                  PRINT #hResult,
                  FOR iCol = 1 TO nCol
                       PRINT #hResult, sRow (iCol, iRow);
                       IF iCol <> nCol THEN
                            PRINT #hResult, ",";
                       END IF
                  NEXT
             NEXT
             PRINT #hResult,
    
       END IF
    
       PRINT #hResult, "** END OF REPORT **"
       CLOSE hREsult
    
    
    
       iRet= SHELL ("Notepad.exe " & sResultFile)
    
    
    WinMainExit:
        ? "Any Key to exit"
        #IF %DEF(%PB_CC32)
          WAITKEY$
        #ENDIF
    
    
    END FUNCTION
    
    
    '' ///  *** END OF FILE *****
    INCLUDE FILE CONTAINING GENERIC "CONNECT AND SELECT" FUNCTION
    UPDATED 11-06-08
    UPDATED 11-08-08
    Code:
    ' ADOEXECUTESELECT.INC
    ' Generic Function to execute a select statement
    ' plus required support functions
    ' Author: MIchael Mattias Tal Systems Inc. Racine WI USA
    ' Use/Distribution:    Placed in public domain by author 11/5/08
    ' Although it's not necessary when public domain it would be nice if you gave me a credit
    ' in any redistribution.
    ' === HISTORY ============
    ' October 2008    Original Development
    ' 11.05.08         Explicitly catch VT_BOOL in fetch and return "0" (false) or "1" (true)
    '                  Change VT_DATE formatting to return time if not zero. String returned
    '                     will be ccyy-mm-dd or  "ccyy-mm-dd hh:mm:ss" with hh in 24-hour format.
    '                  Cleaned up commenting (a lot).
    '                  Fixed BUG: Column names were going into sRow(0 based col#) and should go into sRow(1 based col#)
    ' 11.08.08         Check oRS recordset at end of fetch loop and if open, close it.
    ' === END HISTORY =====
    ' CALLABLE FUNCTION AND PARAMETERS
    ' DECLARE FUNCTION ADOExecuteSelect (szConnect AS ASCIIZ, szSQL AS ASCIIZ, sRow() AS STRING, sErrMsg AS STRING) AS LONG
    ' returns.. 0 - success and S(col, row) is sized and filled thus:
    '    col 1-N          = columns ordinals 1-n; ie., (0,any) is never populated
    '    Row  0, cols 1-N = Column names
    '    row  1-N         = Data rows
    
    ' If function returns TRUE => some kind of error and a text message is deposited in sErrMsg.
    ' Using STRING for SerrMsg since it conceiveably could be a really long message
    ' and I do not wish to be constrained by SIZEOF(buffer) if buffer = ASCIIZ type.
    ' ---------------------------
    ' REQUIRED #INCLUDE files
    ' ---------------------------
    #IF NOT %DEF(%WINAPI)
      #INCLUDE "WIN32API.INC"
    #ENDIF
    
    #INCLUDE   "ADODB28DISP.INC"  ' generated with PB/CC 5.0 com browser "dispatch only" option,
    #IF NOT %DEF(%VT_DECIMAL)
      %VT_DECIMAL = 14
    #ENDIF
    ' ----------------------------------------------------------------------
    ' ROW INCREMENT: by how many rows the sRow() array grows when resized
    ' Note allocation is (nCol+1)*(nRow+1)* 4 bytes at a time since this is array of dynamic strings
    ' ' ----------------------------------------------------------------------
    %ADODB_ROW_INCR   =     1024&   '  when 16 return columns will allocate only 64K at a crack.
    ' ----------------------------------------------------------
    ' DATA CONVERSION FUNCTIONS USED IN THE FETCH FROM SELECT
    ' ----------------------------------------------------------
    'DECLARE FUNCTION VarBstrFromDec LIB "OLEAUT32.DLL" ALIAS "VarBstrFromDec" _
      ' (pdecIn AS ANY, BYVAL lcid AS DWORD, BYVAL dwFlags AS DWORD, pbstrOut AS STRING) AS LONG
    FUNCTION VtDecimalToString (vDec AS VARIANT) AS STRING
        LOCAL S AS STRING, hr AS LONG
        hr = VarBstrFromDec(vDec, %LOCALE_USER_DEFAULT, 0, S)
        FUNCTION =  ACODE$(S)
    END FUNCTION
    
    ' Cnvert a VT_DATE to a dynamic string
    ' Variant time is "ccyymmddpart.timepart" so if VARIANT# has a FRAC part it includes
    ' a time component as well as a date component.
    ' Tested format of time component 11/5/08
    ' official ODBC timestamp format is ccyy-mm-dd hh:mm:ss
    FUNCTION DbDatefromVariantDate (vDate AS VARIANT) AS STRING
    
        LOCAL ST AS SYSTEMTIME
        LOCAL szDF AS ASCIIZ * 48,  szDate AS ASCIIZ * 48
        LOCAL szTF AS ASCIIZ * 48,  szTime AS ASCIIZ * 48
        LOCAL vbTime AS DOUBLE
    
        vbTime = VARIANT#(vDate)
        VariantTimeToSystemTime vbTime, St
        ' always format the date
        szDf          =  "yyyy'-'MM'-'dd"
        GetDateFormat    BYVAL %NULL, BYVAL %NULL ,st, szDf, szDate, SIZEOF (szDate)
    
        ' only add the time string if present
        IF FRAC (vbTime) THEN
             szTF     = "HH':'mm':'ss"  ' HH= 24 hour, hh= 12 hour
             GetTimeFormat    BYVAL %NULL, BYVAL %NULL ,st, szTF, szTime, SIZEOF (szTime)
             FUNCTION = szDate & $SPC & szTime
         ELSE
            FUNCTION      = szDate
         END IF
    END FUNCTION
    
    ' -------------------------------------------
    ' ADOExecuteSelect
    ' Generic FUNCTION.
    '  szConnect = Connection string. Not modfied here
    '  szSQL     = Statement to be executed. Not modified here
    FUNCTION ADOExecuteSelect (szConnect AS ASCIIZ, szSQL AS ASCIIZ, _
                               sRow() AS STRING, sErrMsg AS STRING) AS LONG
      LOCAL oConn AS INT__Connection
      LOCAL vConn AS VARIANT       ' connection string so I can try multiple
      LOCAL vState AS VARIANT
      LOCAL iState AS LONG
      LOCAL vProvider AS VARIANT   ' get after connection
      ' to create a recordset on the connnection
      LOCAL sCOnnect AS STRING
      LOCAL oRs AS Int__RecordSet
      LOCAL oFields  AS  fields, vFields AS VARIANT
      LOCAL oField   AS Int_Field,   vField  AS VARIANT
      LOCAL vSql AS VARIANT, vnRow AS VARIANT
      LOCAL vW   AS VARIANT  ' working var
      LOCAL nCol AS LONG, iCol AS LONG
      LOCAL nRow      AS LONG, iRow AS LONG
    
      LOCAL sColName() AS STRING
      LOCAL vColIndex AS VARIANT, vColName AS VARIANT
      LOCAL vEOF AS VARIANT
      LOCAL vItem     AS VARIANT
    
      LOCAL sIdispInfoText AS STRING
    
      LOCAL vValue    AS VARIANT
      LOCAL sValue    AS STRING
      LOCAL hOut      AS LONG, sBUff AS STRING
      LOCAL iRet      AS LONG
      LOCAL vErrIndex AS VARIANT
      LOCAL vErrDesc  AS VARIANT
      LOCAL vErrCount AS VARIANT
      LOCAL nErr      AS LONG
      LOCAL iErr      AS LONG
      LOCAL s         AS STRING
      LOCAL w         AS STRING
      LOCAL fv        AS LONG   ' function value. %S_OK =0
    
      ' ---------------------------
      ' Begin code portion here
      ' ---------------------------
    
      ' create a connection object
      SET oConn  = NEWCOM $PROGID_ADODB_Connection   ' CC 5 syntax
    
      IF ISOBJECT(oConn) THEN
         sConnect    = szCOnnect   'convert passed connection info to dynamic string
         vConn       = sConnect    ' and then to a variant
         s           = ""          ' initialize
         OBJECT CALL   oConn.Open (vConn)   ' establish connection
    
         iRet        = OBJRESULT
         IF iRet <> %S_OK THEN               ' some kind of error
    
             w = "Connection error:"
    
           ' Get the IDISPINFO information if applicable BEFORE we make
           ' any additional calls against the oCONN object
            IF iRet = %DISP_E_EXCEPTION  THEN   ' iDISPINFO applies.
                 CALL ADOGetIDispInfoErrorText () TO sIDispInfoText
            ELSE
                 siDispINfoText = ""
            END IF
            ' -----------------------------------------------------------------
            ' TRY TO GET THE ERRORS OBJECT, even if we have IDISPINFO message;
            ' you CAN get both! We want to use the errors info if available
            ' If not available, then we use the sIDispInfoText string
            ' we already have.
            ' -----------------------------------------------------------------
            OBJECT GET   oconn.Errors.Count  TO vErrCount
            nErr       = VARIANT#(vErrCount)
    
    
            'if error count is zero, must be ADO runtime error or Windows Error;
            'or, the exception error I got when the provider was not found.
            'in any event the only error info we have will be the IDISPINFO
            'material, so we can return now
            IF nErr = 0 THEN
               IF iRet = %DISP_E_EXCEPTION THEN
                   S         = sIDispInfoText
                   IF LEN(S) = 0 THEN
                        s = "0x0009 (Exception); IDISPINFO error information not available"
                   END IF
               ELSE              'not an 'exception' we can get text
                   CALL ADogetRuntimeERrorInfo (iRet)  TO s  ' "0xABCD text..."
               END IF
               ' set error message and goto cleanup (we have no Errors object to deal with)
                sErrMsg  = W & S    ' "connection error:" S strng
                fv       = iRet
                GOTO AdoDbExecuteSelect_Exit
    
            ELSE  ' we WERE able to get the Errors object so
                  ' we will use that to report.
    
                FOR iErr = 0 TO nErr-1
                   vErrIndex =  iErr
                   OBJECT GET oConn.Errors.Item(vErrIndex).Description TO vErrDesc
                   IF ierr = 0 THEN
                        S = VARIANT$(vErrDesc)
                   ELSE
                        S =  S & $CRLF & VARIANT$(vErrDesc)
                   END IF
                NEXT
            END IF ' if the error was DISP_E_EXCEPTION or not
            ' set error message and exit to cleanup
            sErrMsg =   W & S
            fv      =   iRet    ' non-zero
            GOTO        AdoDBExecuteSelect_Exit
    
         END IF  ' if the open (Connect) succeeded or not
    
         ' --------------------------------------------------------------------------------------
         ' When we get here, we are connected to database and ready to set up SQL for execution.
         ' ---------------------------------------------------------------------------------------
         ' create a working recordset object: the oCONN.Execute returns this
         SET oRS  =  NEWCOM  $PROGID_ADODB_Recordset
         s        = szSQL             ' convert passed query to dynamic string
         vSql     = S                 ' convert to required VARIANT data type
    
        ' --------------------------
        '  EXECUTE THE QUERY
        ' vNRow returns nothing of interest on a select. (as far as I can tell_
        ' --------------------------
         OBJECT CALL  oConn.Execute (vSql, vnRow) TO vW
         iRet = OBJRESULT   ' most recent
         IF iRet <> %S_OK THEN
                   W = "Execute sQL Error:"
                  ' get first error message only FIXME should get count here?
                  vErrIndex =  0&
                  OBJECT GET oConn.Errors.Item(vErrIndex).Description TO vErrDesc
                  S =  VARIANT$(verrDesc)
                  sErrMsg = USING$ ("& _0x& &", W, HEX$(iret, 4), S)
                  fv = 1
                  GOTO  AdoDBExecuteSelect_Exit
    
         END IF
         ' ------------------------------------------------------
         ' if here, execute succeed and it returned a recordset.
         ' ------------------------------------------------------
         LET oRS  =  vW   ' does this work? It compiles, it works. I never had problems if I got
                          ' to this point, but here, too I sold probably check ISOBJECT
    
         ' test vnrow here; does not return anything useful on a SELECT although it should return
         ' 'rows affected' on an UPDATE or INSERT
         '?  "On this succesful SELECT, vnRow=" & FORMAT$ (VARIANT#(vnRow))
    
         'Get the fields object from the recordset (to get the column names)
         OBJECT GET    oRs.Fields TO vFields
         LET           oFields = vFields
         OBJECT GET oFields.Count TO vW
         nCol       = VARIANT#(vW)
          ' here is where we need to Size our return array as we will be returning
          ' the column names in row 0 and data in the rows after that.
         REDIM    sRow (nCol, %ADODB_ROW_INCR)    ' columns are 1 based
         iRow    = 0
         FOR icol  = 0 TO ncol-1   ' uses index
               LET vColIndex  = iCOL
               OBJECT GET       oFields.Item (vColIndex) TO vField
               LET   oField   = vField
               OBJECT GET       oField.Name  TO vColName
               sRow (iCol +1, iRow) = VARIANT$(vColName)
         NEXT
          ' -----------------------------------------------------
          ' now we get the actual returned datarows
          ' ------------------------------------------------------
          nRow     = 0                       ' Number of DATA rows (the sRow() row subscript) we read
          OBJECT CALL oRS.MoveFirst          ' position the cursor
          DO                                 ' perform FETCH loop
             OBJECT GET oRs.EOF  TO vEOF
             IF ISTRUE VARIANT#(vEof) THEN
               ' Exit the fetch loop
                 EXIT DO
             END IF
             ' When we get here we have a row of data to get
             INCR iRow
             ' make sure it will fit; if not make array big enough to hold another block of rows
             IF iRow >  UBOUND (sRow,2) THEN
                  REDIM PRESERVE sRow (nCol, iRow + %ADODB_ROW_INCR)
             END IF
             FOR iCol    = 0 TO nCol-1             ' we got nCol earlier; now get each column of data in this row
                 LET vCOlIndex   =  icol           ' which column
                 OBJECT GET Ors.Fields.Item(vColIndex).Value TO vValue
                  ' Format to a string based on the data type
                 SELECT CASE VARIANTVT (vValue)
                    CASE %VT_EMPTY
                        sValue = ""
                    CASE %VT_NULL
                        sValue = ""    ' we get %VT_NULL if column is null. PB Help does not suggested testing
                                       ' this but I do.
                    CASE %VT_BSTR
                        sValue =  VARIANT$(vValue)
                    CASE  %VT_DATE    ' type 7
                       CALL DbDateFromVariantDate (vValue) TO sValue
                    CASE %VT_DECIMAL    ' %VT_DECIMAL=14 = "16 byte fixed point"
                         ' 10-05-08 jet is giving me a type 3.. from ptmn.mdb
                         ' table = I4 handled below.
                         CALL VtDecimalToString (vValue)  TO sValue
                   ' KNOWN NUMERIC TYPES OTHER THAN DECIMAL
                        ' I2, I4, R4, R8, CY, I1, UI1, UI2, UI4, I8, UI8 INT UINT
                    ' 2   3   4    5  6   16  17   18   19   20   21  22  23
    
                    CASE %VT_BOOL    ' added this handler 11-5-08
                          sValue = IIF$(ISTRUE VARIANT#(vvalue), "1", "0")
    
                    ' KNOWN NUMERIC TYPES
                     CASE %VT_I2, %VT_I4, %VT_R4, %VT_R8, %VT_CY, %VT_I1, %VT_UI1,_
                          %VT_UI2, %VT_UI4, %VT_I8, %VT_UI8, %VT_INT, %VT_UINT
                              SValue = FORMAT$(VARIANT#(vValue))
                    ' if we get an unexpected type, we want to know about it so we can
                    ' add an explicit handler for it.
                     CASE ELSE
                        sValue = USING$ ("UNKNOWN TYPE #  FORMAT_$(VARIANT_#(VALUE)) IS '&'", VARIANTVT(vvalue), FORMAT$(VARIANT#(vValue)))
                  END SELECT
                 ' put sValue in its place remember we use 1 based cols in array
                 ' but zero-based for the fetch.
                  sRow (iCol + 1, iRow) = sValue
             NEXT iCol
             OBJECT CALL ors.MoveNext  ' next row
          LOOP
          ' -----------------------------------------------------
          ' end of fetch loop;
          ' iRow = number of data rows we have actually fetched
          ' -----------------------------------------------------
          ' resize array unless we were really really luck vis-a-vis the number of returned rows
          IF iRow <> UBOUND (sRow, 2) THEN
               REDIM PRESERVE sRow (nCol, iRow)
          END IF
         ' --------------------------
           fv =  0   ' SUCCESS!!!
           
         ' 11.08.08 test if recordset open and if so close it before disconnecting
          OBJECT GET ors.State TO vState
          iState    =  VARIANT# (vState)
          IF iState = %adStateOpen THEN
               '? "ORS RecordSet WAS OPEN at end of fetch, closing "
               ' OBJECT CALL ors.Close
               ' NOTE it *WAS* open at conclusion of fetch loop.
               ' SLEEP 5000
          END IF
         ' disconnect from database (we don't get here if we don't connect).
           OBJECT CALL oConn.Close
    
      ELSE
          sErrMsg = "Could not create Connection object - ADO may be outdated or installed incorrectly"
          fv      =  %TRUE   ' error
      END IF
    
    
    ADoDBExecuteSelect_Exit:
      SET oconn    = NOTHING
      SET oRs      = NOTHING
      SET oFields  = NOTHING
      SET oField   = NOTHING
    
      FUNCTION = fv
    
    
    END FUNCTION  ' ADOExecuteSelect
    
    
    ' ========================================================================================
    ' Returns the description of an ADO runtime error
    ' param in = OBJRESULT()
    ' This function is called by AdogetErrorinfo when the ERror object cannot be found/Created
    ' If function returns null string, it is not a recognized error and is probably a WIndows error
    ' Courtesy: Jose Roca
    ' ========================================================================================
    FUNCTION AdoGetRuntimeErrorInfo (BYVAL wError AS WORD) AS STRING
    
       LOCAL s AS STRING
    
       SELECT CASE AS LONG wError
          CASE 3000 ' &HBB8 - %adErrProviderFailed
             s = "Provider failed to perform the requested operation."
          CASE 3001 ' &HBB9 - %adErrInvalidArgument
             s = "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another."
          CASE 3002 ' &HBBA - %adErrOpeningFile
             s = "File could not be opened."
          CASE 3003 ' &HBBB - %adErrReadFile
             s = "File could not be read."
          CASE 3004 ' &HBBC - %adErrWriteFile
             s = "Write to file failed."
          CASE 3021 ' &HBCD - %adErrNoCurrentRecord
             s = "Either BOF or EOF is True, or the current record has been deleted. Requested operation requires a current record."
          CASE 3219 ' &HC93 - %adErrIllegalOperation
             s = "Operation is not allowed in this context."
          CASE 3220 ' &HC94 - %adErrCantChangeProvider
             s = "Supplied provider is different from the one already in use."
          CASE 3246 ' &HCAE - %adErrInTransaction
             s = "Connection object cannot be explicitly closed while in a transaction."
          CASE 3251 ' &HCB3 - %adErrFeatureNotAvailable
             s = "Object or provider is not capable of performing requested operation."
          CASE 3265 ' &HCC1 - %adErrItemNotFound
             s = "Item cannot be found in the collection corresponding to the requested name or ordinal."
          CASE 3367 ' &HD27 - %adErrObjectInCollection
             s = "Object is already in collection. Cannot append."
          CASE 3420 ' &HD5C - %adErrObjectNotSet
             s = "Object is no longer valid."
          CASE 3421 ' &HD5D - %adErrDataConversion
             s = "Application uses a value of the wrong type for the current operation."
          CASE 3704 ' &HE78 - %adErrObjectClosed
             s = "Operation is not allowed when the object is closed. "
          CASE 3705 ' &HE79 - %adErrObjectOpen
             s = "Operation is not allowed when the object is open. "
          CASE 3706 ' &HE7A - %adErrProviderNotFound
             s = "Provider cannot be found. It may not be properly installed."
          CASE 3707 ' &HE7B - %adErrBoundToCommand
             s = "Cannot change the ActiveConnection property of a Recordset object which has a Command object as its source."
          CASE 3708 ' &HE7C - %adErrInvalidParamInfo
             s = "Parameter object is improperly defined. Inconsistent or incomplete information was provided."
          CASE 3709 ' &HE7D - %adErrInvalidConnection
             s = "The connection cannot be used to perform this operation. It is either closed or invalid in this context."
          CASE 3710 ' &HE7E - %adErrNotReentrant
             s = "Operation cannot be performed while processing event. "
          CASE 3711 ' &HE7F - %adErrStillExecuting
             s = "Operation cannot be performed while executing asynchronously."
          CASE 3712 ' &HE80 - %adErrOperationCancelled
             s = "Operation has been cancelled by the user."
          CASE 3713 ' &HE81 - %adErrStillConnecting
             s = "Operation cannot be performed while connecting aynchronously. "
          CASE 3714 ' &HE82 - %adErrInvalidTransaction
             s = "Coordinating transaction is invalid or has not started."
          CASE 3715 ' &HE83 - %adErrNotExecuting
             s = "Operation cannot be performed while not executing."
          CASE 3716 ' &HE84 - %adErrUnsafeOperation
             s = "Safety settings on this computer prohibit accessing a data source on another domain."
    '      CASE 3717 ' &HE85 - %adwrnSecurityDialog
    '         For internal use only. Don't use.
    '      CASE 3718 ' &HE86 - %adwrnSecurityDialogHeader
    '         For internal use only. Don't use.
          CASE 3719 ' &HE87 - %adErrIntegrityViolation
             s = "Data value conflicts with the integrity constraints of the field."
          CASE 3720 ' &HE88 - %adErrPermissionDenied
             s = "Insufficent permission prevents writing to the field."
          CASE 3721 ' &HE89 - %adErrDataOverflow
             s = "Data value is too large to be represented by the field data type."
          CASE 3722 ' &HE8A - %adErrSchemaViolation
             s = "Data value conflicts with the data type or constraints of the field."
          CASE 3723 ' &HE8B - %adErrSignMismatch
             s = "Conversion failed because the data value was signed and the field data type used by the provider was unsigned."
          CASE 3724 ' &HE8C - %adErrCantConvertvalue
             s = "Data value cannot be converted for reasons other than sign mismatch or data overflow. For example, conversion would have truncated data."
          CASE 3725 ' &HE8D - %adErrCantCreate
             s = "Data value cannot be set or retrieved because the field data type was unknown, or the provider had insufficient resources to perform the operation."
          CASE 3726 ' &HE8E - %adErrColumnNotOnThisRow
             s = "Record does not contain this field."
          CASE 3727 ' &HE8F - %adErrURLDoesNotExist
             s = "Either the source URL or the parent of the destination URL does not exist."
          CASE 3728 ' &HE90 - %adErrTreePermissionDenied
             s = "Permissions are insufficient to access tree or subtree. "
          CASE 3729 ' &HE91 - %adErrInvalidURL
             s = "URL contains invalid characters. Make sure the URL is typed correctly."
          CASE 3730 ' &HE92 - %adErrResourceLocked
             s = "Object represented by the specified URL is locked by one or more other processes. Wait until the process has finished and attempt the operation again."
          CASE 3731 ' &HE93 - %adErrResourceExists
             s = "Copy operation cannot be performed. Object named by destination URL already exists. Specify adCopyOverwrite to replace the object."
          CASE 3732 ' &HE94 - %adErrCannotComplete
             s = "Server cannot complete the operation."
          CASE 3733 ' &HE95 - %adErrVolumeNotFound
             s = "Provider cannot locate the storage device indicated by the URL. Make sure the URL is typed correctly."
          CASE 3734 ' &HE96 - %adErrOutOfSpace
             s = "Operation cannot be performed. Provider cannot obtain enough storage space."
          CASE 3735 ' &HE97 - %adErrResourceOutOfScope
             s = "Source or destination URL is outside the scope of the current record."
          CASE 3736 ' &HE98 - %adErrUnavailable
             s = "Operation failed to complete and the status is unavailable. The field may be unavailable or the operation was not attempted."
          CASE 3737 ' &HE99 - %adErrURLNamedRowDoesNotExist
             s = "Record named by this URL does not exist."
          CASE 3738 ' &HE9A - %adErrDelResOutOfScope
             s = "URL of the object to be deleted is outside the scope of the current record."
          CASE 3739 ' &HE9B - %adErrPropInvalidColumn
             s = "Cannot apply property to field"
          CASE 3740 ' &HE9C - %adErrPropInvalidOption
             s = "Attribute property invalid"
          CASE 3741 ' &HE9D - %adErrPropInvalidValue
             s = "Invalid property value"
          CASE 3742 ' &HE9E - %adErrPropConflicting
             s = "Property values conflict with each other"
          CASE 3743 ' &HE9F - %adErrPropNotAllSettable
             s = "Cannot set property or read-only"
          CASE 3744 ' &HEA0 - %adErrPropNotSet
             s = "Optional property value not set"
          CASE 3745 ' &HEA1 - %adErrPropNotSettable
             s = "Read-only property cannot be set"
          CASE 3746 ' &HEA2 - %adErrPropNotSupported
             s = "Property not supported by provider"
          CASE 3747 ' &HEA3 - %adErrCatalogNotSet
             s = "Operation requires a valid ParentCatalog."
          CASE 3748 ' &HEA4 - %adErrCantChangeConnection
             s = "Connection was denied. New connection you requested has different characteristics than the one already in use."
          CASE 3749 ' &HEA5 - %adErrFieldsUpdateFailed
             s = "Fields update failed. For further information, examine the Status property of individual field objects."
          CASE 3750 ' &HEA6 - %adErrDenyNotSupported
             s = "Provider does not support sharing restrictions."
          CASE 3751 ' &HEA7 - %adErrDenyTypeNotSupported
             s = "Provider does not support the requested kind of sharing restriction."
          CASE 3753 ' 3753 - %adErrProviderNotSpecified
             s = "Provider not specified"
          CASE 3754 ' &HEAA - %adErrConnectionStringTooLong
             s = "Connection string too long"
          CASE ELSE
             s =  "No description available."
    
       END SELECT
    
       FUNCTION =  USING$("_0X& &", HEX$(wError, 4), S)
    
    END FUNCTION
    
    ' --------------------------------------------
    ' This function I can conditionally test
    ' based on compiler version.
    ' --------------------------------------------
    FUNCTION ADOGetIDispInfoErrorText () AS  STRING
    ' called on DISP_E_EXCEPTION, but only used when we cannot get
    ' the "regular" Errors object.
    
      LOCAL S AS STRING
      LOCAL w AS STRING
    
      W = FORMAT$(IDISPINFO.CODE)
      S = USING$ ("DispInfo Code '&'", w)
      W = FORMAT$(IDISPINFO.CONTEXT)
      S = s & $CRLF & USING$ ("DispInfo Context '&'", w)
      W =  IDISPINFO.DESC$
      S = s & $CRLF & USING$ ("DispInfo Description '&'", W)
      W =  IDISPINFO.HELP$
      S = s & $CRLF & USING$ ("DispInfo Help(file) '&'", w)
      W = IDISPINFO.SOURCE$
      S = s & $CRLF & USING$ ("DispInfo Source'&'", W)
      S = s & $CRLF & "End of IDISPINFO error messages for DISP_E_EXCEPTION"
    
      FUNCTION = S
    
    END FUNCTION
    
    ' /// END OF FILE
    ADO LIBRARY FILE
    Code:
    ' Generated by: PowerBASIC COM Browser v.2.00.0058
    ' DateTime    : 10/5/2008 at 5:20 PM
    ' ------------------------------------------------
    ' Library Name: ADODB
    ' Library File: C:\Program Files\Common Files\System\ado\msado15.dll
    ' Description : Microsoft ActiveX Data Objects 2.8 Library
    ' Help File : C:\WINDOWS\help\ado270.chm
    ' Help Context : 0
    ' GUID : {2A75196C-D9EB-4129-B803-931327F72D5C}
    ' LCID : 0
    ' Version : 2.8
    
    ' Version Dependant ProgID's
    $PROGID_ADODB_Connection8 = "ADODB.Connection.2.8"
    $PROGID_ADODB_Record8 = "ADODB.Record.2.8"
    $PROGID_ADODB_Stream8 = "ADODB.Stream.2.8"
    $PROGID_ADODB_Command8 = "ADODB.Command.2.8"
    $PROGID_ADODB_Recordset8 = "ADODB.Recordset.2.8"
    $PROGID_ADODB_Parameter8 = "ADODB.Parameter.2.8"
    
    ' Version Independant ProgID's
    $PROGID_ADODB_Connection = "ADODB.Connection"
    $PROGID_ADODB_Record = "ADODB.Record"
    $PROGID_ADODB_Stream = "ADODB.Stream"
    $PROGID_ADODB_Command = "ADODB.Command"
    $PROGID_ADODB_Recordset = "ADODB.Recordset"
    $PROGID_ADODB_Parameter = "ADODB.Parameter"
    
    ' Class Indentifiers
    $CLSID_ADODB_Connection = GUID$("{00000514-0000-0010-8000-00AA006D2EA4}")
    $CLSID_ADODB_Event_ConnectionEvents = GUID$("{5DC77391-4566-4FA8-907C-42042796C6B4}")
    $CLSID_ADODB_Record = GUID$("{00000560-0000-0010-8000-00AA006D2EA4}")
    $CLSID_ADODB_Stream = GUID$("{00000566-0000-0010-8000-00AA006D2EA4}")
    $CLSID_ADODB_Command = GUID$("{00000507-0000-0010-8000-00AA006D2EA4}")
    $CLSID_ADODB_Recordset = GUID$("{00000535-0000-0010-8000-00AA006D2EA4}")
    $CLSID_ADODB_Event_RecordsetEvents = GUID$("{4F2EC524-1CCA-4A0B-A78A-E304AF92955E}")
    $CLSID_ADODB_Parameter = GUID$("{0000050B-0000-0010-8000-00AA006D2EA4}")
    
    ' Interface Indentifiers
    $IID_ADODB_Int__Collection = GUID$("{00000512-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__DynaCollection = GUID$("{00000513-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__ADO = GUID$("{00000534-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Properties = GUID$("{00000504-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int_Property = GUID$("{00000503-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int_Error = GUID$("{00000500-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Errors = GUID$("{00000501-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Command15 = GUID$("{00000508-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Connection = GUID$("{00000550-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Connection15 = GUID$("{00000515-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Recordset = GUID$("{00000556-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Recordset21 = GUID$("{00000555-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Recordset20 = GUID$("{0000054F-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Recordset15 = GUID$("{0000050E-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Fields = GUID$("{00000564-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Fields20 = GUID$("{0000054D-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Fields15 = GUID$("{00000506-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int_Field = GUID$("{00000569-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Field20 = GUID$("{0000054C-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Parameter = GUID$("{0000050C-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Parameters = GUID$("{0000050D-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Command25 = GUID$("{0000054E-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Command = GUID$("{B08400BD-F9D1-4D02-B856-71D5DBA123E9}")
    $IID_ADODB_ConnectionEvents = GUID$("{00000400-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_RecordsetEvents = GUID$("{00000266-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Record = GUID$("{00000562-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Int__Stream = GUID$("{00000565-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_ADORecordConstruction = GUID$("{00000567-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_ADOStreamConstruction = GUID$("{00000568-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_ADORecordsetConstruction = GUID$("{00000283-0000-0010-8000-00AA006D2EA4}")
    $IID_ADODB_Field15 = GUID$("{00000505-0000-0010-8000-00AA006D2EA4}")
    
    ' Macros
    MACRO PositionEnum_Param = LONG
    MACRO SearchDirection = LONG
    MACRO ADO_LONGPTR = LONG
    
    ' CursorTypeEnum enumeration
    %adOpenUnspecified = -1
    %adOpenForwardOnly = 0
    %adOpenKeyset = 1
    %adOpenDynamic = 2
    %adOpenStatic = 3
    
    ' CursorOptionEnum enumeration
    %adHoldRecords = 256
    %adMovePrevious = 512
    %adAddNew = 16778240
    %adDelete = 16779264
    %adUpdate = 16809984
    %adBookmark = 8192
    %adApproxPosition = 16384
    %adUpdateBatch = 65536
    %adResync = 131072
    %adNotify = 262144
    %adFind = 524288
    %adSeek = 4194304
    %adIndex = 8388608
    
    ' LockTypeEnum enumeration
    %adLockUnspecified = -1
    %adLockReadOnly = 1
    %adLockPessimistic = 2
    %adLockOptimistic = 3
    %adLockBatchOptimistic = 4
    
    ' ExecuteOptionEnum enumeration
    %adOptionUnspecified = -1
    %adAsyncExecute = 16
    %adAsyncFetch = 32
    %adAsyncFetchNonBlocking = 64
    %adExecuteNoRecords = 128
    %adExecuteStream = 1024
    %adExecuteRecord = 2048
    
    ' ConnectOptionEnum enumeration
    %adConnectUnspecified = -1
    %adAsyncConnect = 16
    
    ' ObjectStateEnum enumeration
    %adStateClosed = 0
    %adStateOpen = 1
    %adStateConnecting = 2
    %adStateExecuting = 4
    %adStateFetching = 8
    
    ' CursorLocationEnum enumeration
    %adUseNone = 1
    %adUseServer = 2
    %adUseClient = 3
    %adUseClientBatch = 3
    
    ' DataTypeEnum enumeration
    %adEmpty = 0
    %adTinyInt = 16
    %adSmallInt = 2
    %adInteger = 3
    %adBigInt = 20
    %adUnsignedTinyInt = 17
    %adUnsignedSmallInt = 18
    %adUnsignedInt = 19
    %adUnsignedBigInt = 21
    %adSingle = 4
    %adDouble = 5
    %adCurrency = 6
    %adDecimal = 14
    %adNumeric = 131
    %adBoolean = 11
    %adError = 10
    %adUserDefined = 132
    %adVariant = 12
    %adIDispatch = 9
    %adIUnknown = 13
    %adGUID = 72
    %adDate = 7
    %adDBDate = 133
    %adDBTime = 134
    %adDBTimeStamp = 135
    %adBSTR = 8
    %adChar = 129
    %adVarChar = 200
    %adLongVarChar = 201
    %adWChar = 130
    %adVarWChar = 202
    %adLongVarWChar = 203
    %adBinary = 128
    %adVarBinary = 204
    %adLongVarBinary = 205
    %adChapter = 136
    %adFileTime = 64
    %adPropVariant = 138
    %adVarNumeric = 139
    %adArray = 8192
    
    ' FieldAttributeEnum enumeration
    %adFldUnspecified = -1
    %adFldMayDefer = 2
    %adFldUpdatable = 4
    %adFldUnknownUpdatable = 8
    %adFldFixed = 16
    %adFldIsNullable = 32
    %adFldMayBeNull = 64
    %adFldLong = 128
    %adFldRowID = 256
    %adFldRowVersion = 512
    %adFldCacheDeferred = 4096
    %adFldIsChapter = 8192
    %adFldNegativeScale = 16384
    %adFldKeyColumn = 32768
    %adFldIsRowURL = 65536
    %adFldIsDefaultStream = 131072
    %adFldIsCollection = 262144
    
    ' EditModeEnum enumeration
    %adEditNone = 0
    %adEditInProgress = 1
    %adEditAdd = 2
    %adEditDelete = 4
    
    ' RecordStatusEnum enumeration
    %adRecOK = 0
    %adRecNew = 1
    %adRecModified = 2
    %adRecDeleted = 4
    %adRecUnmodified = 8
    %adRecInvalid = 16
    %adRecMultipleChanges = 64
    %adRecPendingChanges = 128
    %adRecCanceled = 256
    %adRecCantRelease = 1024
    %adRecConcurrencyViolation = 2048
    %adRecIntegrityViolation = 4096
    %adRecMaxChangesExceeded = 8192
    %adRecObjectOpen = 16384
    %adRecOutOfMemory = 32768
    %adRecPermissionDenied = 65536
    %adRecSchemaViolation = 131072
    %adRecDBDeleted = 262144
    
    ' GetRowsOptionEnum enumeration
    %adGetRowsRest = -1
    
    ' PositionEnum enumeration
    %adPosUnknown = -1
    %adPosBOF = -2
    %adPosEOF = -3
    
    ' BookmarkEnum enumeration
    %adBookmarkCurrent = 0
    %adBookmarkFirst = 1
    %adBookmarkLast = 2
    
    ' MarshalOptionsEnum enumeration
    %adMarshalAll = 0
    %adMarshalModifiedOnly = 1
    
    ' AffectEnum enumeration
    %adAffectCurrent = 1
    %adAffectGroup = 2
    %adAffectAll = 3
    %adAffectAllChapters = 4
    
    ' ResyncEnum enumeration
    %adResyncUnderlyingValues = 1
    %adResyncAllValues = 2
    
    ' CompareEnum enumeration
    %adCompareLessThan = 0
    %adCompareEqual = 1
    %adCompareGreaterThan = 2
    %adCompareNotEqual = 3
    %adCompareNotComparable = 4
    
    ' FilterGroupEnum enumeration
    %adFilterNone = 0
    %adFilterPendingRecords = 1
    %adFilterAffectedRecords = 2
    %adFilterFetchedRecords = 3
    %adFilterPredicate = 4
    %adFilterConflictingRecords = 5
    
    ' SearchDirectionEnum enumeration
    %adSearchForward = 1
    %adSearchBackward = -1
    
    ' PersistFormatEnum enumeration
    %adPersistADTG = 0
    %adPersistXML = 1
    
    ' StringFormatEnum enumeration
    %adClipString = 2
    
    ' ConnectPromptEnum enumeration
    %adPromptAlways = 1
    %adPromptComplete = 2
    %adPromptCompleteRequired = 3
    %adPromptNever = 4
    
    ' ConnectModeEnum enumeration
    %adModeUnknown = 0
    %adModeRead = 1
    %adModeWrite = 2
    %adModeReadWrite = 3
    %adModeShareDenyRead = 4
    %adModeShareDenyWrite = 8
    %adModeShareExclusive = 12
    %adModeShareDenyNone = 16
    %adModeRecursive = 4194304
    
    ' RecordCreateOptionsEnum enumeration
    %adCreateCollection = 8192
    %adCreateStructDoc = -2147483648
    %adCreateNonCollection = 0
    %adOpenIfExists = 33554432
    %adCreateOverwrite = 67108864
    %adFailIfNotExists = -1
    
    ' RecordOpenOptionsEnum enumeration
    %adOpenRecordUnspecified = -1
    %adOpenSource = 8388608
    %adOpenOutput = 8388608
    %adOpenAsync = 4096
    %adDelayFetchStream = 16384
    %adDelayFetchFields = 32768
    %adOpenExecuteCommand = 65536
    
    ' IsolationLevelEnum enumeration
    %adXactUnspecified = -1
    %adXactChaos = 16
    %adXactReadUncommitted = 256
    %adXactBrowse = 256
    %adXactCursorStability = 4096
    %adXactReadCommitted = 4096
    %adXactRepeatableRead = 65536
    %adXactSerializable = 1048576
    %adXactIsolated = 1048576
    
    ' XactAttributeEnum enumeration
    %adXactCommitRetaining = 131072
    %adXactAbortRetaining = 262144
    %adXactAsyncPhaseOne = 524288
    %adXactSyncPhaseOne = 1048576
    
    ' PropertyAttributesEnum enumeration
    %adPropNotSupported = 0
    %adPropRequired = 1
    %adPropOptional = 2
    %adPropRead = 512
    %adPropWrite = 1024
    
    ' ErrorValueEnum enumeration
    %adErrProviderFailed = 3000
    %adErrInvalidArgument = 3001
    %adErrOpeningFile = 3002
    %adErrReadFile = 3003
    %adErrWriteFile = 3004
    %adErrNoCurrentRecord = 3021
    %adErrIllegalOperation = 3219
    %adErrCantChangeProvider = 3220
    %adErrInTransaction = 3246
    %adErrFeatureNotAvailable = 3251
    %adErrItemNotFound = 3265
    %adErrObjectInCollection = 3367
    %adErrObjectNotSet = 3420
    %adErrDataConversion = 3421
    %adErrObjectClosed = 3704
    %adErrObjectOpen = 3705
    %adErrProviderNotFound = 3706
    %adErrBoundToCommand = 3707
    %adErrInvalidParamInfo = 3708
    %adErrInvalidConnection = 3709
    %adErrNotReentrant = 3710
    %adErrStillExecuting = 3711
    %adErrOperationCancelled = 3712
    %adErrStillConnecting = 3713
    %adErrInvalidTransaction = 3714
    %adErrNotExecuting = 3715
    %adErrUnsafeOperation = 3716
    %adwrnSecurityDialog = 3717
    %adwrnSecurityDialogHeader = 3718
    %adErrIntegrityViolation = 3719
    %adErrPermissionDenied = 3720
    %adErrDataOverflow = 3721
    %adErrSchemaViolation = 3722
    %adErrSignMismatch = 3723
    %adErrCantConvertvalue = 3724
    %adErrCantCreate = 3725
    %adErrColumnNotOnThisRow = 3726
    %adErrURLDoesNotExist = 3727
    %adErrTreePermissionDenied = 3728
    %adErrInvalidURL = 3729
    %adErrResourceLocked = 3730
    %adErrResourceExists = 3731
    %adErrCannotComplete = 3732
    %adErrVolumeNotFound = 3733
    %adErrOutOfSpace = 3734
    %adErrResourceOutOfScope = 3735
    %adErrUnavailable = 3736
    %adErrURLNamedRowDoesNotExist = 3737
    %adErrDelResOutOfScope = 3738
    %adErrPropInvalidColumn = 3739
    %adErrPropInvalidOption = 3740
    %adErrPropInvalidValue = 3741
    %adErrPropConflicting = 3742
    %adErrPropNotAllSettable = 3743
    %adErrPropNotSet = 3744
    %adErrPropNotSettable = 3745
    %adErrPropNotSupported = 3746
    %adErrCatalogNotSet = 3747
    %adErrCantChangeConnection = 3748
    %adErrFieldsUpdateFailed = 3749
    %adErrDenyNotSupported = 3750
    %adErrDenyTypeNotSupported = 3751
    %adErrProviderNotSpecified = 3753
    %adErrConnectionStringTooLong = 3754
    
    ' ParameterAttributesEnum enumeration
    %adParamSigned = 16
    %adParamNullable = 64
    %adParamLong = 128
    
    ' ParameterDirectionEnum enumeration
    %adParamUnknown = 0
    %adParamInput = 1
    %adParamOutput = 2
    %adParamInputOutput = 3
    %adParamReturnValue = 4
    
    ' CommandTypeEnum enumeration
    %adCmdUnspecified = -1
    %adCmdUnknown = 8
    %adCmdText = 1
    %adCmdTable = 2
    %adCmdStoredProc = 4
    %adCmdFile = 256
    %adCmdTableDirect = 512
    
    ' EventStatusEnum enumeration
    %adStatusOK = 1
    %adStatusErrorsOccurred = 2
    %adStatusCantDeny = 3
    %adStatusCancel = 4
    %adStatusUnwantedEvent = 5
    
    ' EventReasonEnum enumeration
    %adRsnAddNew = 1
    %adRsnDelete = 2
    %adRsnUpdate = 3
    %adRsnUndoUpdate = 4
    %adRsnUndoAddNew = 5
    %adRsnUndoDelete = 6
    %adRsnRequery = 7
    %adRsnResynch = 8
    %adRsnClose = 9
    %adRsnMove = 10
    %adRsnFirstChange = 11
    %adRsnMoveFirst = 12
    %adRsnMoveNext = 13
    %adRsnMovePrevious = 14
    %adRsnMoveLast = 15
    
    ' SchemaEnum enumeration
    %adSchemaProviderSpecific = -1
    %adSchemaAsserts = 0
    %adSchemaCatalogs = 1
    %adSchemaCharacterSets = 2
    %adSchemaCollations = 3
    %adSchemaColumns = 4
    %adSchemaCheckConstraints = 5
    %adSchemaConstraintColumnUsage = 6
    %adSchemaConstraintTableUsage = 7
    %adSchemaKeyColumnUsage = 8
    %adSchemaReferentialContraints = 9
    %adSchemaReferentialConstraints = 9
    %adSchemaTableConstraints = 10
    %adSchemaColumnsDomainUsage = 11
    %adSchemaIndexes = 12
    %adSchemaColumnPrivileges = 13
    %adSchemaTablePrivileges = 14
    %adSchemaUsagePrivileges = 15
    %adSchemaProcedures = 16
    %adSchemaSchemata = 17
    %adSchemaSQLLanguages = 18
    %adSchemaStatistics = 19
    %adSchemaTables = 20
    %adSchemaTranslations = 21
    %adSchemaProviderTypes = 22
    %adSchemaViews = 23
    %adSchemaViewColumnUsage = 24
    %adSchemaViewTableUsage = 25
    %adSchemaProcedureParameters = 26
    %adSchemaForeignKeys = 27
    %adSchemaPrimaryKeys = 28
    %adSchemaProcedureColumns = 29
    %adSchemaDBInfoKeywords = 30
    %adSchemaDBInfoLiterals = 31
    %adSchemaCubes = 32
    %adSchemaDimensions = 33
    %adSchemaHierarchies = 34
    %adSchemaLevels = 35
    %adSchemaMeasures = 36
    %adSchemaProperties = 37
    %adSchemaMembers = 38
    %adSchemaTrustees = 39
    %adSchemaFunctions = 40
    %adSchemaActions = 41
    %adSchemaCommands = 42
    %adSchemaSets = 43
    
    ' FieldStatusEnum enumeration
    %adFieldOK = 0
    %adFieldCantConvertValue = 2
    %adFieldIsNull = 3
    %adFieldTruncated = 4
    %adFieldSignMismatch = 5
    %adFieldDataOverflow = 6
    %adFieldCantCreate = 7
    %adFieldUnavailable = 8
    %adFieldPermissionDenied = 9
    %adFieldIntegrityViolation = 10
    %adFieldSchemaViolation = 11
    %adFieldBadStatus = 12
    %adFieldDefault = 13
    %adFieldIgnore = 15
    %adFieldDoesNotExist = 16
    %adFieldInvalidURL = 17
    %adFieldResourceLocked = 18
    %adFieldResourceExists = 19
    %adFieldCannotComplete = 20
    %adFieldVolumeNotFound = 21
    %adFieldOutOfSpace = 22
    %adFieldCannotDeleteSource = 23
    %adFieldReadOnly = 24
    %adFieldResourceOutOfScope = 25
    %adFieldAlreadyExists = 26
    %adFieldPendingInsert = 65536
    %adFieldPendingDelete = 131072
    %adFieldPendingChange = 262144
    %adFieldPendingUnknown = 524288
    %adFieldPendingUnknownDelete = 1048576
    
    ' SeekEnum enumeration
    %adSeekFirstEQ = 1
    %adSeekLastEQ = 2
    %adSeekAfterEQ = 4
    %adSeekAfter = 8
    %adSeekBeforeEQ = 16
    %adSeekBefore = 32
    
    ' ADCPROP_UPDATECRITERIA_ENUM enumeration
    %adCriteriaKey = 0
    %adCriteriaAllCols = 1
    %adCriteriaUpdCols = 2
    %adCriteriaTimeStamp = 3
    
    ' ADCPROP_ASYNCTHREADPRIORITY_ENUM enumeration
    %adPriorityLowest = 1
    %adPriorityBelowNormal = 2
    %adPriorityNormal = 3
    %adPriorityAboveNormal = 4
    %adPriorityHighest = 5
    
    ' ADCPROP_AUTORECALC_ENUM enumeration
    %adRecalcUpFront = 0
    %adRecalcAlways = 1
    
    ' ADCPROP_UPDATERESYNC_ENUM enumeration
    %adResyncNone = 0
    %adResyncAutoIncrement = 1
    %adResyncConflicts = 2
    %adResyncUpdates = 4
    %adResyncInserts = 8
    %adResyncAll = 15
    
    ' MoveRecordOptionsEnum enumeration
    %adMoveUnspecified = -1
    %adMoveOverWrite = 1
    %adMoveDontUpdateLinks = 2
    %adMoveAllowEmulation = 4
    
    ' CopyRecordOptionsEnum enumeration
    %adCopyUnspecified = -1
    %adCopyOverWrite = 1
    %adCopyAllowEmulation = 4
    %adCopyNonRecursive = 2
    
    ' StreamTypeEnum enumeration
    %adTypeBinary = 1
    %adTypeText = 2
    
    ' LineSeparatorEnum enumeration
    %adLF = 10
    %adCR = 13
    %adCRLF = -1
    
    ' StreamOpenOptionsEnum enumeration
    %adOpenStreamUnspecified = -1
    %adOpenStreamAsync = 1
    %adOpenStreamFromRecord = 4
    
    ' StreamWriteEnum enumeration
    %adWriteChar = 0
    %adWriteLine = 1
    %stWriteChar = 0
    %stWriteLine = 1
    
    ' SaveOptionsEnum enumeration
    %adSaveCreateNotExist = 1
    %adSaveCreateOverWrite = 2
    
    ' FieldEnum enumeration
    %adDefaultStream = -1
    %adRecordURL = -2
    
    ' StreamReadEnum enumeration
    %adReadAll = -1
    %adReadLine = -2
    
    ' RecordTypeEnum enumeration
    %adSimpleRecord = 0
    %adCollectionRecord = 1
    %adStructDoc = 2
    
    
    ' Interface Name  : Int__Collection
    INTERFACE IDBIND Int__Collection
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
    END INTERFACE
    
    ' Interface Name  : Int__DynaCollection
    INTERFACE IDBIND Int__DynaCollection
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER CALL APPEND <1610809344> (IN PB_Object AS IDISPATCH<0>)
        MEMBER CALL DELETE <1610809345> (IN Index AS VARIANT<0>)
        MEMBER CALL APPEND <1610809344> (IN PB_Object AS IDISPATCH<0>)
        MEMBER CALL DELETE <1610809345> (IN Index AS VARIANT<0>)
    END INTERFACE
    
    ' Interface Name  : Int__ADO
    INTERFACE IDBIND Int__ADO
        MEMBER GET Properties <500> () AS Properties
    END INTERFACE
    
    ' Interface Name  : Properties
    INTERFACE IDBIND Properties
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Property
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Property
    END INTERFACE
    
    ' Interface Name  : Int_Property
    INTERFACE IDBIND Int_Property
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN pval AS VARIANT<0>)
        MEMBER GET NAME <1610743810> () AS STRING
        MEMBER GET TYPE <1610743811> () AS LONG
        MEMBER GET Attributes <1610743812> () AS LONG
        MEMBER LET Attributes <1610743812> (IN plAttributes AS LONG<0>)
    END INTERFACE
    
    ' Interface Name  : Int_Error
    INTERFACE IDBIND Int_Error
        MEMBER GET Number <1> () AS LONG
        MEMBER GET SOURCE <2> () AS STRING
        MEMBER GET Description <0> () AS STRING
        MEMBER GET HelpFile <3> () AS STRING
        MEMBER GET HelpContext <4> () AS LONG
        MEMBER GET SQLState <5> () AS STRING
        MEMBER GET NativeError <6> () AS LONG
    END INTERFACE
    
    ' Interface Name  : Errors
    INTERFACE IDBIND Errors
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Error
        MEMBER CALL CLEAR <1610809345> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Error
        MEMBER CALL CLEAR <1610809345> ()
    END INTERFACE
    
    ' Interface Name  : Command15
    INTERFACE IDBIND Command15
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActiveConnection <1> () AS Int__Connection
        MEMBER LET PutRef_ActiveConnection <1> (IN Rhs AS Int__Connection<0>)
        MEMBER LET ActiveConnection <1> (IN Rhs AS VARIANT<0>)
        MEMBER GET CommandText <2> () AS STRING
        MEMBER LET CommandText <2> (IN Rhs AS STRING<0>)
        MEMBER GET CommandTimeout <3> () AS LONG
        MEMBER LET CommandTimeout <3> (IN Rhs AS LONG<0>)
        MEMBER GET Prepared <4> () AS INTEGER
        MEMBER LET Prepared <4> (IN Rhs AS INTEGER<0>)
        MEMBER CALL Execute <5> (OPT OUT RecordsAffected AS VARIANT<0>, OPT IN PB_Parameters AS VARIANT<1>, OPT IN Options AS _
            LONG<2>) AS Int__Recordset
        MEMBER CALL CreateParameter <6> (OPT IN PB_Name AS STRING<0>, OPT IN PB_Type AS LONG<1>, OPT IN Direction AS LONG<2>, _
            OPT IN SIZE AS LONG<3>, OPT IN Value AS VARIANT<4>) AS Int__Parameter
        MEMBER GET Parameters <0> () AS Parameters
        MEMBER LET CommandType <7> (IN Rhs AS LONG<0>)
        MEMBER GET CommandType <7> () AS LONG
        MEMBER GET NAME <8> () AS STRING
        MEMBER LET NAME <8> (IN Rhs AS STRING<0>)
        MEMBER GET ActiveConnection <1> () AS Int__Connection
        MEMBER LET PutRef_ActiveConnection <1> (IN ppvObject AS Int__Connection<0>)
        MEMBER LET ActiveConnection <1> (IN ppvObject AS VARIANT<0>)
        MEMBER GET CommandText <2> () AS STRING
        MEMBER LET CommandText <2> (IN pbstr AS STRING<0>)
        MEMBER GET CommandTimeout <3> () AS LONG
        MEMBER LET CommandTimeout <3> (IN pl AS LONG<0>)
        MEMBER GET Prepared <4> () AS INTEGER
        MEMBER LET Prepared <4> (IN pfPrepared AS INTEGER<0>)
        MEMBER CALL Execute <5> (OPT OUT RecordsAffected AS VARIANT<0>, OPT IN PB_Parameters AS VARIANT<1>, OPT IN Options AS _
            LONG<2>) AS Int__Recordset
        MEMBER CALL CreateParameter <6> (OPT IN PB_Name AS STRING<0>, OPT IN PB_Type AS LONG<1>, OPT IN Direction AS LONG<2>, _
            OPT IN SIZE AS LONG<3>, OPT IN Value AS VARIANT<4>) AS Int__Parameter
        MEMBER GET Parameters <0> () AS Parameters
        MEMBER LET CommandType <7> (IN plCmdType AS LONG<0>)
        MEMBER GET CommandType <7> () AS LONG
        MEMBER GET NAME <8> () AS STRING
        MEMBER LET NAME <8> (IN pbstrName AS STRING<0>)
    END INTERFACE
    
    ' Interface Name  : Int__Connection
    ' ClassID         : $CLSID_ADODB_Connection
    ' ProgID          : $PROGID_ADODB_Connection
    ' Version ProgID  : $PROGID_ADODB_Connection8
    INTERFACE IDBIND Int__Connection
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ConnectionString <0> () AS STRING
        MEMBER LET ConnectionString <0> (IN Rhs AS STRING<0>)
        MEMBER GET CommandTimeout <2> () AS LONG
        MEMBER LET CommandTimeout <2> (IN Rhs AS LONG<0>)
        MEMBER GET ConnectionTimeout <3> () AS LONG
        MEMBER LET ConnectionTimeout <3> (IN Rhs AS LONG<0>)
        MEMBER GET Version <4> () AS STRING
        MEMBER CALL CLOSE <5> ()
        MEMBER CALL Execute <6> (IN CommandText AS STRING<0>, OPT OUT RecordsAffected AS VARIANT<1>, OPT IN Options AS LONG<2>) _
            AS Int__Recordset
        MEMBER CALL BeginTrans <7> () AS LONG
        MEMBER CALL CommitTrans <8> ()
        MEMBER CALL RollbackTrans <9> ()
        MEMBER CALL OPEN <10> (OPT IN ConnectionString AS STRING<0>, OPT IN UserID AS STRING<1>, OPT IN Password AS STRING<2>, _
            OPT IN Options AS LONG<3>)
        MEMBER GET Errors <11> () AS Errors
        MEMBER GET DefaultDatabase <12> () AS STRING
        MEMBER LET DefaultDatabase <12> (IN Rhs AS STRING<0>)
        MEMBER GET IsolationLevel <13> () AS LONG
        MEMBER LET IsolationLevel <13> (IN Rhs AS LONG<0>)
        MEMBER GET Attributes <14> () AS LONG
        MEMBER LET Attributes <14> (IN Rhs AS LONG<0>)
        MEMBER GET CursorLocation <15> () AS LONG
        MEMBER LET CursorLocation <15> (IN Rhs AS LONG<0>)
        MEMBER GET MODE <16> () AS LONG
        MEMBER LET MODE <16> (IN Rhs AS LONG<0>)
        MEMBER GET Provider <17> () AS STRING
        MEMBER LET Provider <17> (IN Rhs AS STRING<0>)
        MEMBER GET STATE <18> () AS LONG
        MEMBER CALL OpenSchema <19> (IN Schema AS LONG<0>, OPT IN Restrictions AS VARIANT<1>, OPT IN SchemaID AS VARIANT<2>) AS _
            Int__Recordset
        MEMBER CALL CANCEL <21> ()
        MEMBER CALL CANCEL <21> ()
    END INTERFACE
    
    ' Interface Name  : Connection15
    INTERFACE IDBIND Connection15
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ConnectionString <0> () AS STRING
        MEMBER LET ConnectionString <0> (IN Rhs AS STRING<0>)
        MEMBER GET CommandTimeout <2> () AS LONG
        MEMBER LET CommandTimeout <2> (IN Rhs AS LONG<0>)
        MEMBER GET ConnectionTimeout <3> () AS LONG
        MEMBER LET ConnectionTimeout <3> (IN Rhs AS LONG<0>)
        MEMBER GET Version <4> () AS STRING
        MEMBER CALL CLOSE <5> ()
        MEMBER CALL Execute <6> (IN CommandText AS STRING<0>, OPT OUT RecordsAffected AS VARIANT<1>, OPT IN Options AS LONG<2>) _
            AS Int__Recordset
        MEMBER CALL BeginTrans <7> () AS LONG
        MEMBER CALL CommitTrans <8> ()
        MEMBER CALL RollbackTrans <9> ()
        MEMBER CALL OPEN <10> (OPT IN ConnectionString AS STRING<0>, OPT IN UserID AS STRING<1>, OPT IN Password AS STRING<2>, _
            OPT IN Options AS LONG<3>)
        MEMBER GET Errors <11> () AS Errors
        MEMBER GET DefaultDatabase <12> () AS STRING
        MEMBER LET DefaultDatabase <12> (IN Rhs AS STRING<0>)
        MEMBER GET IsolationLevel <13> () AS LONG
        MEMBER LET IsolationLevel <13> (IN Rhs AS LONG<0>)
        MEMBER GET Attributes <14> () AS LONG
        MEMBER LET Attributes <14> (IN Rhs AS LONG<0>)
        MEMBER GET CursorLocation <15> () AS LONG
        MEMBER LET CursorLocation <15> (IN Rhs AS LONG<0>)
        MEMBER GET MODE <16> () AS LONG
        MEMBER LET MODE <16> (IN Rhs AS LONG<0>)
        MEMBER GET Provider <17> () AS STRING
        MEMBER LET Provider <17> (IN Rhs AS STRING<0>)
        MEMBER GET STATE <18> () AS LONG
        MEMBER CALL OpenSchema <19> (IN Schema AS LONG<0>, OPT IN Restrictions AS VARIANT<1>, OPT IN SchemaID AS VARIANT<2>) AS _
            Int__Recordset
        MEMBER GET ConnectionString <0> () AS STRING
        MEMBER LET ConnectionString <0> (IN pbstr AS STRING<0>)
        MEMBER GET CommandTimeout <2> () AS LONG
        MEMBER LET CommandTimeout <2> (IN plTimeout AS LONG<0>)
        MEMBER GET ConnectionTimeout <3> () AS LONG
        MEMBER LET ConnectionTimeout <3> (IN plTimeout AS LONG<0>)
        MEMBER GET Version <4> () AS STRING
        MEMBER CALL CLOSE <5> ()
        MEMBER CALL Execute <6> (IN CommandText AS STRING<0>, OPT OUT RecordsAffected AS VARIANT<1>, OPT IN Options AS LONG<2>) _
            AS Int__Recordset
        MEMBER CALL BeginTrans <7> () AS LONG
        MEMBER CALL CommitTrans <8> ()
        MEMBER CALL RollbackTrans <9> ()
        MEMBER CALL OPEN <10> (OPT IN ConnectionString AS STRING<0>, OPT IN UserID AS STRING<1>, OPT IN Password AS STRING<2>, _
            OPT IN Options AS LONG<3>)
        MEMBER GET Errors <11> () AS Errors
        MEMBER GET DefaultDatabase <12> () AS STRING
        MEMBER LET DefaultDatabase <12> (IN pbstr AS STRING<0>)
        MEMBER GET IsolationLevel <13> () AS LONG
        MEMBER LET IsolationLevel <13> (IN Level AS LONG<0>)
        MEMBER GET Attributes <14> () AS LONG
        MEMBER LET Attributes <14> (IN plAttr AS LONG<0>)
        MEMBER GET CursorLocation <15> () AS LONG
        MEMBER LET CursorLocation <15> (IN plCursorLoc AS LONG<0>)
        MEMBER GET MODE <16> () AS LONG
        MEMBER LET MODE <16> (IN plMode AS LONG<0>)
        MEMBER GET Provider <17> () AS STRING
        MEMBER LET Provider <17> (IN pbstr AS STRING<0>)
        MEMBER GET STATE <18> () AS LONG
        MEMBER CALL OpenSchema <19> (IN Schema AS LONG<0>, OPT IN Restrictions AS VARIANT<1>, OPT IN SchemaID AS VARIANT<2>) AS _
            Int__Recordset
    END INTERFACE
    
    ' Interface Name  : Int__Recordset
    ' ClassID         : $CLSID_ADODB_Recordset
    ' ProgID          : $PROGID_ADODB_Recordset
    ' Version ProgID  : $PROGID_ADODB_Recordset8
    INTERFACE IDBIND Int__Recordset
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET AbsolutePosition <1000> () AS LONG
        MEMBER LET AbsolutePosition <1000> (IN Rhs AS LONG<0>)
        MEMBER LET PutRef_ActiveConnection <1001> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET ActiveConnection <1001> (IN Rhs AS VARIANT<0>)
        MEMBER GET ActiveConnection <1001> () AS VARIANT
        MEMBER GET BOF <1002> () AS INTEGER
        MEMBER GET Bookmark <1003> () AS VARIANT
        MEMBER LET Bookmark <1003> (IN Rhs AS VARIANT<0>)
        MEMBER GET CacheSize <1004> () AS LONG
        MEMBER LET CacheSize <1004> (IN Rhs AS LONG<0>)
        MEMBER GET CursorType <1005> () AS LONG
        MEMBER LET CursorType <1005> (IN Rhs AS LONG<0>)
        MEMBER GET EOF <1006> () AS INTEGER
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET LockType <1008> () AS LONG
        MEMBER LET LockType <1008> (IN Rhs AS LONG<0>)
        MEMBER GET MaxRecords <1009> () AS LONG
        MEMBER LET MaxRecords <1009> (IN Rhs AS LONG<0>)
        MEMBER GET RecordCount <1010> () AS LONG
        MEMBER LET PutRef_Source <1011> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET SOURCE <1011> (IN Rhs AS STRING<0>)
        MEMBER GET SOURCE <1011> () AS VARIANT
        MEMBER CALL AddNew <1012> (OPT IN FieldList AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER CALL CancelUpdate <1013> ()
        MEMBER CALL CLOSE <1014> ()
        MEMBER CALL DELETE <1015> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL GetRows <1016> (OPT IN Rows AS LONG<0>, OPT IN Start AS VARIANT<1>, OPT IN PB_Fields AS VARIANT<2>) AS _
            VARIANT
        MEMBER CALL MOVE <1017> (IN NumRecords AS LONG<0>, OPT IN Start AS VARIANT<1>)
        MEMBER CALL MoveNext <1018> ()
        MEMBER CALL MovePrevious <1019> ()
        MEMBER CALL MoveFirst <1020> ()
        MEMBER CALL MoveLast <1021> ()
        MEMBER CALL OPEN <1022> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN CursorType AS _
            LONG<2>, OPT IN LockType AS LONG<3>, OPT IN Options AS LONG<4>)
        MEMBER CALL Requery <1023> (OPT IN Options AS LONG<0>)
        MEMBER CALL Meth__xResync <1610809378> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL Update <1025> (OPT IN PB_Fields AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER GET AbsolutePage <1047> () AS LONG
        MEMBER LET AbsolutePage <1047> (IN Rhs AS LONG<0>)
        MEMBER GET EditMode <1026> () AS LONG
        MEMBER GET Filter <1030> () AS VARIANT
        MEMBER LET Filter <1030> (IN Rhs AS VARIANT<0>)
        MEMBER GET PageCount <1050> () AS LONG
        MEMBER GET PAGESIZE <1048> () AS LONG
        MEMBER LET PAGESIZE <1048> (IN Rhs AS LONG<0>)
        MEMBER GET SORT <1031> () AS STRING
        MEMBER LET SORT <1031> (IN Rhs AS STRING<0>)
        MEMBER GET STATUS <1029> () AS LONG
        MEMBER GET STATE <1054> () AS LONG
        MEMBER CALL Meth__xClone <1610809392> () AS Int__Recordset
        MEMBER CALL UpdateBatch <1035> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL CancelBatch <1049> (OPT IN AffectRecords AS LONG<0>)
        MEMBER GET CursorLocation <1051> () AS LONG
        MEMBER LET CursorLocation <1051> (IN Rhs AS LONG<0>)
        MEMBER CALL NextRecordset <1052> (OPT OUT RecordsAffected AS VARIANT<0>) AS Int__Recordset
        MEMBER CALL Supports <1036> (IN CursorOptions AS LONG<0>) AS INTEGER
        MEMBER GET Collect <-8> (IN Index AS VARIANT<0>) AS VARIANT
        MEMBER LET Collect <-8> (IN Index AS VARIANT<0>, IN Rhs AS VARIANT<1>)
        MEMBER GET MarshalOptions <1053> () AS LONG
        MEMBER LET MarshalOptions <1053> (IN Rhs AS LONG<0>)
        MEMBER CALL FIND <1058> (IN Criteria AS STRING<0>, OPT IN SkipRecords AS LONG<1>, OPT IN PB_SearchDirection AS LONG<2>, _
            OPT IN Start AS VARIANT<3>)
        MEMBER CALL CANCEL <1055> ()
        MEMBER GET DataSource <1056> () AS IUNKNOWN
        MEMBER LET PutRef_DataSource <1056> (IN Rhs AS IUNKNOWN<0>)
        MEMBER CALL Meth__xSave <1610874883> (OPT IN FileName AS STRING<0>, OPT IN PersistFormat AS LONG<1>)
        MEMBER GET ActiveCommand <1061> () AS IDISPATCH
        MEMBER LET StayInSync <1063> (IN Rhs AS INTEGER<0>)
        MEMBER GET StayInSync <1063> () AS INTEGER
        MEMBER CALL GetString <1062> (OPT IN StringFormat AS LONG<0>, OPT IN NumRows AS LONG<1>, OPT IN ColumnDelimeter AS _
            STRING<2>, OPT IN RowDelimeter AS STRING<3>, OPT IN NullExpr AS STRING<4>) AS STRING
        MEMBER GET DataMember <1064> () AS STRING
        MEMBER LET DataMember <1064> (IN Rhs AS STRING<0>)
        MEMBER CALL CompareBookmarks <1065> (IN Bookmark1 AS VARIANT<0>, IN Bookmark2 AS VARIANT<1>) AS LONG
        MEMBER CALL Clone <1034> (OPT IN LockType AS LONG<0>) AS Int__Recordset
        MEMBER CALL Resync <1024> (OPT IN AffectRecords AS LONG<0>, OPT IN ResyncValues AS LONG<1>)
        MEMBER CALL SEEK <1066> (IN KeyValues AS VARIANT<0>, OPT IN SeekOption AS LONG<1>)
        MEMBER LET Index <1067> (IN Rhs AS STRING<0>)
        MEMBER GET Index <1067> () AS STRING
        MEMBER CALL SAVE <1057> (OPT IN Destination AS VARIANT<0>, OPT IN PersistFormat AS LONG<1>)
        MEMBER CALL SAVE <1057> (OPT IN Destination AS VARIANT<0>, OPT IN PersistFormat AS LONG<1>)
    END INTERFACE
    
    ' Interface Name  : Recordset21
    INTERFACE IDBIND Recordset21
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET AbsolutePosition <1000> () AS LONG
        MEMBER LET AbsolutePosition <1000> (IN Rhs AS LONG<0>)
        MEMBER LET PutRef_ActiveConnection <1001> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET ActiveConnection <1001> (IN Rhs AS VARIANT<0>)
        MEMBER GET ActiveConnection <1001> () AS VARIANT
        MEMBER GET BOF <1002> () AS INTEGER
        MEMBER GET Bookmark <1003> () AS VARIANT
        MEMBER LET Bookmark <1003> (IN Rhs AS VARIANT<0>)
        MEMBER GET CacheSize <1004> () AS LONG
        MEMBER LET CacheSize <1004> (IN Rhs AS LONG<0>)
        MEMBER GET CursorType <1005> () AS LONG
        MEMBER LET CursorType <1005> (IN Rhs AS LONG<0>)
        MEMBER GET EOF <1006> () AS INTEGER
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET LockType <1008> () AS LONG
        MEMBER LET LockType <1008> (IN Rhs AS LONG<0>)
        MEMBER GET MaxRecords <1009> () AS LONG
        MEMBER LET MaxRecords <1009> (IN Rhs AS LONG<0>)
        MEMBER GET RecordCount <1010> () AS LONG
        MEMBER LET PutRef_Source <1011> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET SOURCE <1011> (IN Rhs AS STRING<0>)
        MEMBER GET SOURCE <1011> () AS VARIANT
        MEMBER CALL AddNew <1012> (OPT IN FieldList AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER CALL CancelUpdate <1013> ()
        MEMBER CALL CLOSE <1014> ()
        MEMBER CALL DELETE <1015> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL GetRows <1016> (OPT IN Rows AS LONG<0>, OPT IN Start AS VARIANT<1>, OPT IN PB_Fields AS VARIANT<2>) AS _
            VARIANT
        MEMBER CALL MOVE <1017> (IN NumRecords AS LONG<0>, OPT IN Start AS VARIANT<1>)
        MEMBER CALL MoveNext <1018> ()
        MEMBER CALL MovePrevious <1019> ()
        MEMBER CALL MoveFirst <1020> ()
        MEMBER CALL MoveLast <1021> ()
        MEMBER CALL OPEN <1022> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN CursorType AS _
            LONG<2>, OPT IN LockType AS LONG<3>, OPT IN Options AS LONG<4>)
        MEMBER CALL Requery <1023> (OPT IN Options AS LONG<0>)
        MEMBER CALL Meth__xResync <1610809378> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL Update <1025> (OPT IN PB_Fields AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER GET AbsolutePage <1047> () AS LONG
        MEMBER LET AbsolutePage <1047> (IN Rhs AS LONG<0>)
        MEMBER GET EditMode <1026> () AS LONG
        MEMBER GET Filter <1030> () AS VARIANT
        MEMBER LET Filter <1030> (IN Rhs AS VARIANT<0>)
        MEMBER GET PageCount <1050> () AS LONG
        MEMBER GET PAGESIZE <1048> () AS LONG
        MEMBER LET PAGESIZE <1048> (IN Rhs AS LONG<0>)
        MEMBER GET SORT <1031> () AS STRING
        MEMBER LET SORT <1031> (IN Rhs AS STRING<0>)
        MEMBER GET STATUS <1029> () AS LONG
        MEMBER GET STATE <1054> () AS LONG
        MEMBER CALL Meth__xClone <1610809392> () AS Int__Recordset
        MEMBER CALL UpdateBatch <1035> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL CancelBatch <1049> (OPT IN AffectRecords AS LONG<0>)
        MEMBER GET CursorLocation <1051> () AS LONG
        MEMBER LET CursorLocation <1051> (IN Rhs AS LONG<0>)
        MEMBER CALL NextRecordset <1052> (OPT OUT RecordsAffected AS VARIANT<0>) AS Int__Recordset
        MEMBER CALL Supports <1036> (IN CursorOptions AS LONG<0>) AS INTEGER
        MEMBER GET Collect <-8> (IN Index AS VARIANT<0>) AS VARIANT
        MEMBER LET Collect <-8> (IN Index AS VARIANT<0>, IN Rhs AS VARIANT<1>)
        MEMBER GET MarshalOptions <1053> () AS LONG
        MEMBER LET MarshalOptions <1053> (IN Rhs AS LONG<0>)
        MEMBER CALL FIND <1058> (IN Criteria AS STRING<0>, OPT IN SkipRecords AS LONG<1>, OPT IN PB_SearchDirection AS LONG<2>, _
            OPT IN Start AS VARIANT<3>)
        MEMBER CALL CANCEL <1055> ()
        MEMBER GET DataSource <1056> () AS IUNKNOWN
        MEMBER LET PutRef_DataSource <1056> (IN Rhs AS IUNKNOWN<0>)
        MEMBER CALL Meth__xSave <1610874883> (OPT IN FileName AS STRING<0>, OPT IN PersistFormat AS LONG<1>)
        MEMBER GET ActiveCommand <1061> () AS IDISPATCH
        MEMBER LET StayInSync <1063> (IN Rhs AS INTEGER<0>)
        MEMBER GET StayInSync <1063> () AS INTEGER
        MEMBER CALL GetString <1062> (OPT IN StringFormat AS LONG<0>, OPT IN NumRows AS LONG<1>, OPT IN ColumnDelimeter AS _
            STRING<2>, OPT IN RowDelimeter AS STRING<3>, OPT IN NullExpr AS STRING<4>) AS STRING
        MEMBER GET DataMember <1064> () AS STRING
        MEMBER LET DataMember <1064> (IN Rhs AS STRING<0>)
        MEMBER CALL CompareBookmarks <1065> (IN Bookmark1 AS VARIANT<0>, IN Bookmark2 AS VARIANT<1>) AS LONG
        MEMBER CALL Clone <1034> (OPT IN LockType AS LONG<0>) AS Int__Recordset
        MEMBER CALL Resync <1024> (OPT IN AffectRecords AS LONG<0>, OPT IN ResyncValues AS LONG<1>)
        MEMBER CALL SEEK <1066> (IN KeyValues AS VARIANT<0>, OPT IN SeekOption AS LONG<1>)
        MEMBER LET Index <1067> (IN Rhs AS STRING<0>)
        MEMBER GET Index <1067> () AS STRING
        MEMBER CALL SEEK <1066> (IN KeyValues AS VARIANT<0>, OPT IN SeekOption AS LONG<1>)
        MEMBER LET Index <1067> (IN pbstrIndex AS STRING<0>)
        MEMBER GET Index <1067> () AS STRING
    END INTERFACE
    
    ' Interface Name  : Recordset20
    INTERFACE IDBIND Recordset20
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET AbsolutePosition <1000> () AS LONG
        MEMBER LET AbsolutePosition <1000> (IN Rhs AS LONG<0>)
        MEMBER LET PutRef_ActiveConnection <1001> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET ActiveConnection <1001> (IN Rhs AS VARIANT<0>)
        MEMBER GET ActiveConnection <1001> () AS VARIANT
        MEMBER GET BOF <1002> () AS INTEGER
        MEMBER GET Bookmark <1003> () AS VARIANT
        MEMBER LET Bookmark <1003> (IN Rhs AS VARIANT<0>)
        MEMBER GET CacheSize <1004> () AS LONG
        MEMBER LET CacheSize <1004> (IN Rhs AS LONG<0>)
        MEMBER GET CursorType <1005> () AS LONG
        MEMBER LET CursorType <1005> (IN Rhs AS LONG<0>)
        MEMBER GET EOF <1006> () AS INTEGER
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET LockType <1008> () AS LONG
        MEMBER LET LockType <1008> (IN Rhs AS LONG<0>)
        MEMBER GET MaxRecords <1009> () AS LONG
        MEMBER LET MaxRecords <1009> (IN Rhs AS LONG<0>)
        MEMBER GET RecordCount <1010> () AS LONG
        MEMBER LET PutRef_Source <1011> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET SOURCE <1011> (IN Rhs AS STRING<0>)
        MEMBER GET SOURCE <1011> () AS VARIANT
        MEMBER CALL AddNew <1012> (OPT IN FieldList AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER CALL CancelUpdate <1013> ()
        MEMBER CALL CLOSE <1014> ()
        MEMBER CALL DELETE <1015> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL GetRows <1016> (OPT IN Rows AS LONG<0>, OPT IN Start AS VARIANT<1>, OPT IN PB_Fields AS VARIANT<2>) AS _
            VARIANT
        MEMBER CALL MOVE <1017> (IN NumRecords AS LONG<0>, OPT IN Start AS VARIANT<1>)
        MEMBER CALL MoveNext <1018> ()
        MEMBER CALL MovePrevious <1019> ()
        MEMBER CALL MoveFirst <1020> ()
        MEMBER CALL MoveLast <1021> ()
        MEMBER CALL OPEN <1022> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN CursorType AS _
            LONG<2>, OPT IN LockType AS LONG<3>, OPT IN Options AS LONG<4>)
        MEMBER CALL Requery <1023> (OPT IN Options AS LONG<0>)
        MEMBER CALL Meth__xResync <1610809378> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL Update <1025> (OPT IN PB_Fields AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER GET AbsolutePage <1047> () AS LONG
        MEMBER LET AbsolutePage <1047> (IN Rhs AS LONG<0>)
        MEMBER GET EditMode <1026> () AS LONG
        MEMBER GET Filter <1030> () AS VARIANT
        MEMBER LET Filter <1030> (IN Rhs AS VARIANT<0>)
        MEMBER GET PageCount <1050> () AS LONG
        MEMBER GET PAGESIZE <1048> () AS LONG
        MEMBER LET PAGESIZE <1048> (IN Rhs AS LONG<0>)
        MEMBER GET SORT <1031> () AS STRING
        MEMBER LET SORT <1031> (IN Rhs AS STRING<0>)
        MEMBER GET STATUS <1029> () AS LONG
        MEMBER GET STATE <1054> () AS LONG
        MEMBER CALL Meth__xClone <1610809392> () AS Int__Recordset
        MEMBER CALL UpdateBatch <1035> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL CancelBatch <1049> (OPT IN AffectRecords AS LONG<0>)
        MEMBER GET CursorLocation <1051> () AS LONG
        MEMBER LET CursorLocation <1051> (IN Rhs AS LONG<0>)
        MEMBER CALL NextRecordset <1052> (OPT OUT RecordsAffected AS VARIANT<0>) AS Int__Recordset
        MEMBER CALL Supports <1036> (IN CursorOptions AS LONG<0>) AS INTEGER
        MEMBER GET Collect <-8> (IN Index AS VARIANT<0>) AS VARIANT
        MEMBER LET Collect <-8> (IN Index AS VARIANT<0>, IN Rhs AS VARIANT<1>)
        MEMBER GET MarshalOptions <1053> () AS LONG
        MEMBER LET MarshalOptions <1053> (IN Rhs AS LONG<0>)
        MEMBER CALL FIND <1058> (IN Criteria AS STRING<0>, OPT IN SkipRecords AS LONG<1>, OPT IN PB_SearchDirection AS LONG<2>, _
            OPT IN Start AS VARIANT<3>)
        MEMBER CALL CANCEL <1055> ()
        MEMBER GET DataSource <1056> () AS IUNKNOWN
        MEMBER LET PutRef_DataSource <1056> (IN Rhs AS IUNKNOWN<0>)
        MEMBER CALL Meth__xSave <1610874883> (OPT IN FileName AS STRING<0>, OPT IN PersistFormat AS LONG<1>)
        MEMBER GET ActiveCommand <1061> () AS IDISPATCH
        MEMBER LET StayInSync <1063> (IN Rhs AS INTEGER<0>)
        MEMBER GET StayInSync <1063> () AS INTEGER
        MEMBER CALL GetString <1062> (OPT IN StringFormat AS LONG<0>, OPT IN NumRows AS LONG<1>, OPT IN ColumnDelimeter AS _
            STRING<2>, OPT IN RowDelimeter AS STRING<3>, OPT IN NullExpr AS STRING<4>) AS STRING
        MEMBER GET DataMember <1064> () AS STRING
        MEMBER LET DataMember <1064> (IN Rhs AS STRING<0>)
        MEMBER CALL CompareBookmarks <1065> (IN Bookmark1 AS VARIANT<0>, IN Bookmark2 AS VARIANT<1>) AS LONG
        MEMBER CALL Clone <1034> (OPT IN LockType AS LONG<0>) AS Int__Recordset
        MEMBER CALL Resync <1024> (OPT IN AffectRecords AS LONG<0>, OPT IN ResyncValues AS LONG<1>)
        MEMBER CALL CANCEL <1055> ()
        MEMBER GET DataSource <1056> () AS IUNKNOWN
        MEMBER LET PutRef_DataSource <1056> (IN ppunkDataSource AS IUNKNOWN<0>)
        MEMBER CALL Meth__xSave <1610874883> (OPT IN FileName AS STRING<0>, OPT IN PersistFormat AS LONG<1>)
        MEMBER GET ActiveCommand <1061> () AS IDISPATCH
        MEMBER LET StayInSync <1063> (IN pbStayInSync AS INTEGER<0>)
        MEMBER GET StayInSync <1063> () AS INTEGER
        MEMBER CALL GetString <1062> (OPT IN StringFormat AS LONG<0>, OPT IN NumRows AS LONG<1>, OPT IN ColumnDelimeter AS _
            STRING<2>, OPT IN RowDelimeter AS STRING<3>, OPT IN NullExpr AS STRING<4>) AS STRING
        MEMBER GET DataMember <1064> () AS STRING
        MEMBER LET DataMember <1064> (IN pbstrDataMember AS STRING<0>)
        MEMBER CALL CompareBookmarks <1065> (IN Bookmark1 AS VARIANT<0>, IN Bookmark2 AS VARIANT<1>) AS LONG
        MEMBER CALL Clone <1034> (OPT IN LockType AS LONG<0>) AS Int__Recordset
        MEMBER CALL Resync <1024> (OPT IN AffectRecords AS LONG<0>, OPT IN ResyncValues AS LONG<1>)
    END INTERFACE
    
    ' Interface Name  : Recordset15
    INTERFACE IDBIND Recordset15
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET AbsolutePosition <1000> () AS LONG
        MEMBER LET AbsolutePosition <1000> (IN Rhs AS LONG<0>)
        MEMBER LET PutRef_ActiveConnection <1001> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET ActiveConnection <1001> (IN Rhs AS VARIANT<0>)
        MEMBER GET ActiveConnection <1001> () AS VARIANT
        MEMBER GET BOF <1002> () AS INTEGER
        MEMBER GET Bookmark <1003> () AS VARIANT
        MEMBER LET Bookmark <1003> (IN Rhs AS VARIANT<0>)
        MEMBER GET CacheSize <1004> () AS LONG
        MEMBER LET CacheSize <1004> (IN Rhs AS LONG<0>)
        MEMBER GET CursorType <1005> () AS LONG
        MEMBER LET CursorType <1005> (IN Rhs AS LONG<0>)
        MEMBER GET EOF <1006> () AS INTEGER
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET LockType <1008> () AS LONG
        MEMBER LET LockType <1008> (IN Rhs AS LONG<0>)
        MEMBER GET MaxRecords <1009> () AS LONG
        MEMBER LET MaxRecords <1009> (IN Rhs AS LONG<0>)
        MEMBER GET RecordCount <1010> () AS LONG
        MEMBER LET PutRef_Source <1011> (IN Rhs AS IDISPATCH<0>)
        MEMBER LET SOURCE <1011> (IN Rhs AS STRING<0>)
        MEMBER GET SOURCE <1011> () AS VARIANT
        MEMBER CALL AddNew <1012> (OPT IN FieldList AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER CALL CancelUpdate <1013> ()
        MEMBER CALL CLOSE <1014> ()
        MEMBER CALL DELETE <1015> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL GetRows <1016> (OPT IN Rows AS LONG<0>, OPT IN Start AS VARIANT<1>, OPT IN PB_Fields AS VARIANT<2>) AS _
            VARIANT
        MEMBER CALL MOVE <1017> (IN NumRecords AS LONG<0>, OPT IN Start AS VARIANT<1>)
        MEMBER CALL MoveNext <1018> ()
        MEMBER CALL MovePrevious <1019> ()
        MEMBER CALL MoveFirst <1020> ()
        MEMBER CALL MoveLast <1021> ()
        MEMBER CALL OPEN <1022> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN CursorType AS _
            LONG<2>, OPT IN LockType AS LONG<3>, OPT IN Options AS LONG<4>)
        MEMBER CALL Requery <1023> (OPT IN Options AS LONG<0>)
        MEMBER CALL Meth__xResync <1610809378> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL Update <1025> (OPT IN PB_Fields AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER GET AbsolutePage <1047> () AS LONG
        MEMBER LET AbsolutePage <1047> (IN Rhs AS LONG<0>)
        MEMBER GET EditMode <1026> () AS LONG
        MEMBER GET Filter <1030> () AS VARIANT
        MEMBER LET Filter <1030> (IN Rhs AS VARIANT<0>)
        MEMBER GET PageCount <1050> () AS LONG
        MEMBER GET PAGESIZE <1048> () AS LONG
        MEMBER LET PAGESIZE <1048> (IN Rhs AS LONG<0>)
        MEMBER GET SORT <1031> () AS STRING
        MEMBER LET SORT <1031> (IN Rhs AS STRING<0>)
        MEMBER GET STATUS <1029> () AS LONG
        MEMBER GET STATE <1054> () AS LONG
        MEMBER CALL Meth__xClone <1610809392> () AS Int__Recordset
        MEMBER CALL UpdateBatch <1035> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL CancelBatch <1049> (OPT IN AffectRecords AS LONG<0>)
        MEMBER GET CursorLocation <1051> () AS LONG
        MEMBER LET CursorLocation <1051> (IN Rhs AS LONG<0>)
        MEMBER CALL NextRecordset <1052> (OPT OUT RecordsAffected AS VARIANT<0>) AS Int__Recordset
        MEMBER CALL Supports <1036> (IN CursorOptions AS LONG<0>) AS INTEGER
        MEMBER GET Collect <-8> (IN Index AS VARIANT<0>) AS VARIANT
        MEMBER LET Collect <-8> (IN Index AS VARIANT<0>, IN Rhs AS VARIANT<1>)
        MEMBER GET MarshalOptions <1053> () AS LONG
        MEMBER LET MarshalOptions <1053> (IN Rhs AS LONG<0>)
        MEMBER CALL FIND <1058> (IN Criteria AS STRING<0>, OPT IN SkipRecords AS LONG<1>, OPT IN PB_SearchDirection AS LONG<2>, _
            OPT IN Start AS VARIANT<3>)
        MEMBER GET AbsolutePosition <1000> () AS LONG
        MEMBER LET AbsolutePosition <1000> (IN pl AS LONG<0>)
        MEMBER LET PutRef_ActiveConnection <1001> (IN pvar AS IDISPATCH<0>)
        MEMBER LET ActiveConnection <1001> (IN pvar AS VARIANT<0>)
        MEMBER GET ActiveConnection <1001> () AS VARIANT
        MEMBER GET BOF <1002> () AS INTEGER
        MEMBER GET Bookmark <1003> () AS VARIANT
        MEMBER LET Bookmark <1003> (IN pvBookmark AS VARIANT<0>)
        MEMBER GET CacheSize <1004> () AS LONG
        MEMBER LET CacheSize <1004> (IN pl AS LONG<0>)
        MEMBER GET CursorType <1005> () AS LONG
        MEMBER LET CursorType <1005> (IN plCursorType AS LONG<0>)
        MEMBER GET EOF <1006> () AS INTEGER
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET LockType <1008> () AS LONG
        MEMBER LET LockType <1008> (IN plLockType AS LONG<0>)
        MEMBER GET MaxRecords <1009> () AS LONG
        MEMBER LET MaxRecords <1009> (IN plMaxRecords AS LONG<0>)
        MEMBER GET RecordCount <1010> () AS LONG
        MEMBER LET PutRef_Source <1011> (IN pvSource AS IDISPATCH<0>)
        MEMBER LET SOURCE <1011> (IN pvSource AS STRING<0>)
        MEMBER GET SOURCE <1011> () AS VARIANT
        MEMBER CALL AddNew <1012> (OPT IN FieldList AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER CALL CancelUpdate <1013> ()
        MEMBER CALL CLOSE <1014> ()
        MEMBER CALL DELETE <1015> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL GetRows <1016> (OPT IN Rows AS LONG<0>, OPT IN Start AS VARIANT<1>, OPT IN PB_Fields AS VARIANT<2>) AS _
            VARIANT
        MEMBER CALL MOVE <1017> (IN NumRecords AS LONG<0>, OPT IN Start AS VARIANT<1>)
        MEMBER CALL MoveNext <1018> ()
        MEMBER CALL MovePrevious <1019> ()
        MEMBER CALL MoveFirst <1020> ()
        MEMBER CALL MoveLast <1021> ()
        MEMBER CALL OPEN <1022> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN CursorType AS _
            LONG<2>, OPT IN LockType AS LONG<3>, OPT IN Options AS LONG<4>)
        MEMBER CALL Requery <1023> (OPT IN Options AS LONG<0>)
        MEMBER CALL Meth__xResync <1610809378> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL Update <1025> (OPT IN PB_Fields AS VARIANT<0>, OPT IN Values AS VARIANT<1>)
        MEMBER GET AbsolutePage <1047> () AS LONG
        MEMBER LET AbsolutePage <1047> (IN pl AS LONG<0>)
        MEMBER GET EditMode <1026> () AS LONG
        MEMBER GET Filter <1030> () AS VARIANT
        MEMBER LET Filter <1030> (IN Criteria AS VARIANT<0>)
        MEMBER GET PageCount <1050> () AS LONG
        MEMBER GET PAGESIZE <1048> () AS LONG
        MEMBER LET PAGESIZE <1048> (IN pl AS LONG<0>)
        MEMBER GET SORT <1031> () AS STRING
        MEMBER LET SORT <1031> (IN Criteria AS STRING<0>)
        MEMBER GET STATUS <1029> () AS LONG
        MEMBER GET STATE <1054> () AS LONG
        MEMBER CALL Meth__xClone <1610809392> () AS Int__Recordset
        MEMBER CALL UpdateBatch <1035> (OPT IN AffectRecords AS LONG<0>)
        MEMBER CALL CancelBatch <1049> (OPT IN AffectRecords AS LONG<0>)
        MEMBER GET CursorLocation <1051> () AS LONG
        MEMBER LET CursorLocation <1051> (IN plCursorLoc AS LONG<0>)
        MEMBER CALL NextRecordset <1052> (OPT OUT RecordsAffected AS VARIANT<0>) AS Int__Recordset
        MEMBER CALL Supports <1036> (IN CursorOptions AS LONG<0>) AS INTEGER
        MEMBER GET Collect <-8> (IN Index AS VARIANT<0>) AS VARIANT
        MEMBER LET Collect <-8> (IN Index AS VARIANT<0>, IN pvar AS VARIANT<1>)
        MEMBER GET MarshalOptions <1053> () AS LONG
        MEMBER LET MarshalOptions <1053> (IN peMarshal AS LONG<0>)
        MEMBER CALL FIND <1058> (IN Criteria AS STRING<0>, OPT IN SkipRecords AS LONG<1>, OPT IN PB_SearchDirection AS LONG<2>, _
            OPT IN Start AS VARIANT<3>)
    END INTERFACE
    
    ' Interface Name  : Fields
    INTERFACE IDBIND Fields
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Field
        MEMBER CALL Meth__Append <1610874880> (IN PB_Name AS STRING<0>, IN PB_Type AS LONG<1>, OPT IN DefinedSize AS LONG<2>, _
            OPT IN PB_Attrib AS LONG<3>)
        MEMBER CALL DELETE <4> (IN Index AS VARIANT<0>)
        MEMBER CALL APPEND <3> (IN PB_Name AS STRING<0>, IN PB_Type AS LONG<1>, OPT IN DefinedSize AS LONG<2>, OPT IN PB_Attrib _
            AS LONG<3>, OPT IN FieldValue AS VARIANT<4>)
        MEMBER CALL Update <5> ()
        MEMBER CALL Resync <6> (OPT IN ResyncValues AS LONG<0>)
        MEMBER CALL CancelUpdate <7> ()
        MEMBER CALL APPEND <3> (IN PB_Name AS STRING<0>, IN PB_Type AS LONG<1>, OPT IN DefinedSize AS LONG<2>, OPT IN PB_Attrib _
            AS LONG<3>, OPT IN FieldValue AS VARIANT<4>)
        MEMBER CALL Update <5> ()
        MEMBER CALL Resync <6> (OPT IN ResyncValues AS LONG<0>)
        MEMBER CALL CancelUpdate <7> ()
    END INTERFACE
    
    ' Interface Name  : Fields20
    INTERFACE IDBIND Fields20
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Field
        MEMBER CALL Meth__Append <1610874880> (IN PB_Name AS STRING<0>, IN PB_Type AS LONG<1>, OPT IN DefinedSize AS LONG<2>, _
            OPT IN PB_Attrib AS LONG<3>)
        MEMBER CALL DELETE <4> (IN Index AS VARIANT<0>)
        MEMBER CALL Meth__Append <1610874880> (IN PB_Name AS STRING<0>, IN PB_Type AS LONG<1>, OPT IN DefinedSize AS LONG<2>, _
            OPT IN PB_Attrib AS LONG<3>)
        MEMBER CALL DELETE <4> (IN Index AS VARIANT<0>)
    END INTERFACE
    
    ' Interface Name  : Fields15
    INTERFACE IDBIND Fields15
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Field
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int_Field
    END INTERFACE
    
    ' Interface Name  : Int_Field
    INTERFACE IDBIND Int_Field
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActualSize <1109> () AS LONG
        MEMBER GET Attributes <1114> () AS LONG
        MEMBER GET DefinedSize <1103> () AS LONG
        MEMBER GET NAME <1100> () AS STRING
        MEMBER GET TYPE <1102> () AS LONG
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN Rhs AS VARIANT<0>)
        MEMBER GET Precision <1112> () AS BYTE
        MEMBER GET NumericScale <1113> () AS BYTE
        MEMBER CALL AppendChunk <1107> (IN PB_Data AS VARIANT<0>)
        MEMBER CALL GetChunk <1108> (IN Length AS LONG<0>) AS VARIANT
        MEMBER GET OriginalValue <1104> () AS VARIANT
        MEMBER GET UnderlyingValue <1105> () AS VARIANT
        MEMBER GET DataFormat <1115> () AS IUNKNOWN
        MEMBER LET PutRef_DataFormat <1115> (IN Rhs AS IUNKNOWN<0>)
        MEMBER LET Precision <1112> (IN Rhs AS BYTE<0>)
        MEMBER LET NumericScale <1113> (IN Rhs AS BYTE<0>)
        MEMBER LET TYPE <1102> (IN Rhs AS LONG<0>)
        MEMBER LET DefinedSize <1103> (IN Rhs AS LONG<0>)
        MEMBER LET Attributes <1114> (IN Rhs AS LONG<0>)
        MEMBER GET STATUS <1116> () AS LONG
        MEMBER GET STATUS <1116> () AS LONG
    END INTERFACE
    
    ' Interface Name  : Field20
    INTERFACE IDBIND Field20
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActualSize <1109> () AS LONG
        MEMBER GET Attributes <1114> () AS LONG
        MEMBER GET DefinedSize <1103> () AS LONG
        MEMBER GET NAME <1100> () AS STRING
        MEMBER GET TYPE <1102> () AS LONG
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN Rhs AS VARIANT<0>)
        MEMBER GET Precision <1112> () AS BYTE
        MEMBER GET NumericScale <1113> () AS BYTE
        MEMBER CALL AppendChunk <1107> (IN PB_Data AS VARIANT<0>)
        MEMBER CALL GetChunk <1108> (IN Length AS LONG<0>) AS VARIANT
        MEMBER GET OriginalValue <1104> () AS VARIANT
        MEMBER GET UnderlyingValue <1105> () AS VARIANT
        MEMBER GET DataFormat <1115> () AS IUNKNOWN
        MEMBER LET PutRef_DataFormat <1115> (IN Rhs AS IUNKNOWN<0>)
        MEMBER LET Precision <1112> (IN Rhs AS BYTE<0>)
        MEMBER LET NumericScale <1113> (IN Rhs AS BYTE<0>)
        MEMBER LET TYPE <1102> (IN Rhs AS LONG<0>)
        MEMBER LET DefinedSize <1103> (IN Rhs AS LONG<0>)
        MEMBER LET Attributes <1114> (IN Rhs AS LONG<0>)
        MEMBER GET ActualSize <1109> () AS LONG
        MEMBER GET Attributes <1114> () AS LONG
        MEMBER GET DefinedSize <1103> () AS LONG
        MEMBER GET NAME <1100> () AS STRING
        MEMBER GET TYPE <1102> () AS LONG
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN pvar AS VARIANT<0>)
        MEMBER GET Precision <1112> () AS BYTE
        MEMBER GET NumericScale <1113> () AS BYTE
        MEMBER CALL AppendChunk <1107> (IN PB_Data AS VARIANT<0>)
        MEMBER CALL GetChunk <1108> (IN Length AS LONG<0>) AS VARIANT
        MEMBER GET OriginalValue <1104> () AS VARIANT
        MEMBER GET UnderlyingValue <1105> () AS VARIANT
        MEMBER GET DataFormat <1115> () AS IUNKNOWN
        MEMBER LET PutRef_DataFormat <1115> (IN ppiDF AS IUNKNOWN<0>)
        MEMBER LET Precision <1112> (IN pbPrecision AS BYTE<0>)
        MEMBER LET NumericScale <1113> (IN pbNumericScale AS BYTE<0>)
        MEMBER LET TYPE <1102> (IN pDataType AS LONG<0>)
        MEMBER LET DefinedSize <1103> (IN pl AS LONG<0>)
        MEMBER LET Attributes <1114> (IN pl AS LONG<0>)
    END INTERFACE
    
    ' Interface Name  : Int__Parameter
    ' ClassID         : $CLSID_ADODB_Parameter
    ' ProgID          : $PROGID_ADODB_Parameter
    ' Version ProgID  : $PROGID_ADODB_Parameter8
    INTERFACE IDBIND Int__Parameter
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET NAME <1> () AS STRING
        MEMBER LET NAME <1> (IN Rhs AS STRING<0>)
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN Rhs AS VARIANT<0>)
        MEMBER GET TYPE <2> () AS LONG
        MEMBER LET TYPE <2> (IN Rhs AS LONG<0>)
        MEMBER LET Direction <3> (IN Rhs AS LONG<0>)
        MEMBER GET Direction <3> () AS LONG
        MEMBER LET Precision <4> (IN Rhs AS BYTE<0>)
        MEMBER GET Precision <4> () AS BYTE
        MEMBER LET NumericScale <5> (IN Rhs AS BYTE<0>)
        MEMBER GET NumericScale <5> () AS BYTE
        MEMBER LET SIZE <6> (IN Rhs AS LONG<0>)
        MEMBER GET SIZE <6> () AS LONG
        MEMBER CALL AppendChunk <7> (IN PB_Val AS VARIANT<0>)
        MEMBER GET Attributes <8> () AS LONG
        MEMBER LET Attributes <8> (IN Rhs AS LONG<0>)
        MEMBER GET NAME <1> () AS STRING
        MEMBER LET NAME <1> (IN pbstr AS STRING<0>)
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN pvar AS VARIANT<0>)
        MEMBER GET TYPE <2> () AS LONG
        MEMBER LET TYPE <2> (IN psDataType AS LONG<0>)
        MEMBER LET Direction <3> (IN plParmDirection AS LONG<0>)
        MEMBER GET Direction <3> () AS LONG
        MEMBER LET Precision <4> (IN pbPrecision AS BYTE<0>)
        MEMBER GET Precision <4> () AS BYTE
        MEMBER LET NumericScale <5> (IN pbScale AS BYTE<0>)
        MEMBER GET NumericScale <5> () AS BYTE
        MEMBER LET SIZE <6> (IN pl AS LONG<0>)
        MEMBER GET SIZE <6> () AS LONG
        MEMBER CALL AppendChunk <7> (IN PB_Val AS VARIANT<0>)
        MEMBER GET Attributes <8> () AS LONG
        MEMBER LET Attributes <8> (IN plParmAttribs AS LONG<0>)
    END INTERFACE
    
    ' Interface Name  : Parameters
    INTERFACE IDBIND Parameters
        MEMBER GET COUNT <1> () AS LONG
        MEMBER CALL Meth__NewEnum <-4> () AS IUNKNOWN
        MEMBER CALL Refresh <2> ()
        MEMBER CALL APPEND <1610809344> (IN PB_Object AS IDISPATCH<0>)
        MEMBER CALL DELETE <1610809345> (IN Index AS VARIANT<0>)
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int__Parameter
        MEMBER GET ITEM <0> (IN Index AS VARIANT<0>) AS Int__Parameter
    END INTERFACE
    
    ' Interface Name  : Command25
    INTERFACE IDBIND Command25
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActiveConnection <1> () AS Int__Connection
        MEMBER LET PutRef_ActiveConnection <1> (IN Rhs AS Int__Connection<0>)
        MEMBER LET ActiveConnection <1> (IN Rhs AS VARIANT<0>)
        MEMBER GET CommandText <2> () AS STRING
        MEMBER LET CommandText <2> (IN Rhs AS STRING<0>)
        MEMBER GET CommandTimeout <3> () AS LONG
        MEMBER LET CommandTimeout <3> (IN Rhs AS LONG<0>)
        MEMBER GET Prepared <4> () AS INTEGER
        MEMBER LET Prepared <4> (IN Rhs AS INTEGER<0>)
        MEMBER CALL Execute <5> (OPT OUT RecordsAffected AS VARIANT<0>, OPT IN PB_Parameters AS VARIANT<1>, OPT IN Options AS _
            LONG<2>) AS Int__Recordset
        MEMBER CALL CreateParameter <6> (OPT IN PB_Name AS STRING<0>, OPT IN PB_Type AS LONG<1>, OPT IN Direction AS LONG<2>, _
            OPT IN SIZE AS LONG<3>, OPT IN Value AS VARIANT<4>) AS Int__Parameter
        MEMBER GET Parameters <0> () AS Parameters
        MEMBER LET CommandType <7> (IN Rhs AS LONG<0>)
        MEMBER GET CommandType <7> () AS LONG
        MEMBER GET NAME <8> () AS STRING
        MEMBER LET NAME <8> (IN Rhs AS STRING<0>)
        MEMBER GET STATE <9> () AS LONG
        MEMBER CALL CANCEL <10> ()
        MEMBER GET STATE <9> () AS LONG
        MEMBER CALL CANCEL <10> ()
    END INTERFACE
    
    ' Interface Name  : Int__Command
    ' ClassID         : $CLSID_ADODB_Command
    ' ProgID          : $PROGID_ADODB_Command
    ' Version ProgID  : $PROGID_ADODB_Command8
    INTERFACE IDBIND Int__Command
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActiveConnection <1> () AS Int__Connection
        MEMBER LET PutRef_ActiveConnection <1> (IN Rhs AS Int__Connection<0>)
        MEMBER LET ActiveConnection <1> (IN Rhs AS VARIANT<0>)
        MEMBER GET CommandText <2> () AS STRING
        MEMBER LET CommandText <2> (IN Rhs AS STRING<0>)
        MEMBER GET CommandTimeout <3> () AS LONG
        MEMBER LET CommandTimeout <3> (IN Rhs AS LONG<0>)
        MEMBER GET Prepared <4> () AS INTEGER
        MEMBER LET Prepared <4> (IN Rhs AS INTEGER<0>)
        MEMBER CALL Execute <5> (OPT OUT RecordsAffected AS VARIANT<0>, OPT IN PB_Parameters AS VARIANT<1>, OPT IN Options AS _
            LONG<2>) AS Int__Recordset
        MEMBER CALL CreateParameter <6> (OPT IN PB_Name AS STRING<0>, OPT IN PB_Type AS LONG<1>, OPT IN Direction AS LONG<2>, _
            OPT IN SIZE AS LONG<3>, OPT IN Value AS VARIANT<4>) AS Int__Parameter
        MEMBER GET Parameters <0> () AS Parameters
        MEMBER LET CommandType <7> (IN Rhs AS LONG<0>)
        MEMBER GET CommandType <7> () AS LONG
        MEMBER GET NAME <8> () AS STRING
        MEMBER LET NAME <8> (IN Rhs AS STRING<0>)
        MEMBER GET STATE <9> () AS LONG
        MEMBER CALL CANCEL <10> ()
        MEMBER LET PutRef_CommandStream <11> (IN Rhs AS IUNKNOWN<0>)
        MEMBER GET CommandStream <11> () AS VARIANT
        MEMBER LET Dialect <12> (IN Rhs AS STRING<0>)
        MEMBER GET Dialect <12> () AS STRING
        MEMBER LET NamedParameters <13> (IN Rhs AS INTEGER<0>)
        MEMBER GET NamedParameters <13> () AS INTEGER
        MEMBER LET PutRef_CommandStream <11> (IN pvStream AS IUNKNOWN<0>)
        MEMBER GET CommandStream <11> () AS VARIANT
        MEMBER LET Dialect <12> (IN pbstrDialect AS STRING<0>)
        MEMBER GET Dialect <12> () AS STRING
        MEMBER LET NamedParameters <13> (IN pfNamedParameters AS INTEGER<0>)
        MEMBER GET NamedParameters <13> () AS INTEGER
    END INTERFACE
    
    ' Interface Name  : ConnectionEvents
    ' ClassID         : $CLSID_ADODB_Event_ConnectionEvents
    ' ProgID          : $PROGID_ADODB_Connection
    ' Version ProgID  : $PROGID_ADODB_Connection8
    CLASS Class_ConnectionEvents $CLSID_ADODB_Event_ConnectionEvents AS EVENT
        INTERFACE ConnectionEvents $IID_ADODB_ConnectionEvents
            INHERIT IDISPATCH
    
            METHOD InfoMessage <0> (BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD BeginTransComplete <1> (BYVAL TransactionLevel AS LONG, BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, _
            BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD CommitTransComplete <3> (BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pConnection AS _
            Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD RollbackTransComplete <2> (BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pConnection AS _
            Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD WillExecute <4> (BYREF IN SOURCE AS STRING, BYREF IN CursorType AS LONG, BYREF IN LockType AS LONG, BYREF IN _
            Options AS LONG, BYREF IN adStatus AS LONG, BYVAL pCommand AS Int__Command, BYVAL pRecordset AS Int__Recordset, _
            BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD ExecuteComplete <5> (BYVAL RecordsAffected AS LONG, BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL _
            pCommand AS Int__Command, BYVAL pRecordset AS Int__Recordset, BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD WillConnect <6> (BYREF IN ConnectionString AS STRING, BYREF IN UserID AS STRING, BYREF IN Password AS STRING, _
            BYREF IN Options AS LONG, BYREF IN adStatus AS LONG, BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD ConnectComplete <7> (BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
            METHOD Disconnect <8> (BYREF IN adStatus AS LONG, BYVAL pConnection AS Int__Connection)
                ' Insert your code here
            END METHOD
    
        END INTERFACE
    END CLASS
    
    ' Interface Name  : RecordsetEvents
    ' ClassID         : $CLSID_ADODB_Event_RecordsetEvents
    ' ProgID          : $PROGID_ADODB_Recordset
    ' Version ProgID  : $PROGID_ADODB_Recordset8
    CLASS Class_RecordsetEvents $CLSID_ADODB_Event_RecordsetEvents AS EVENT
        INTERFACE RecordsetEvents $IID_ADODB_RecordsetEvents
            INHERIT IDISPATCH
    
            METHOD WillChangeField <9> (BYVAL cFields AS LONG, BYVAL PB_Fields AS VARIANT, BYREF IN adStatus AS LONG, BYVAL _
            pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD FieldChangeComplete <10> (BYVAL cFields AS LONG, BYVAL PB_Fields AS VARIANT, BYVAL pError AS Int_Error, BYREF IN _
            adStatus AS LONG, BYVAL pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD WillChangeRecord <11> (BYVAL adReason AS LONG, BYVAL cRecords AS LONG, BYREF IN adStatus AS LONG, BYVAL _
            pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD RecordChangeComplete <12> (BYVAL adReason AS LONG, BYVAL cRecords AS LONG, BYVAL pError AS Int_Error, BYREF IN _
            adStatus AS LONG, BYVAL pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD WillChangeRecordset <13> (BYVAL adReason AS LONG, BYREF IN adStatus AS LONG, BYVAL pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD RecordsetChangeComplete <14> (BYVAL adReason AS LONG, BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL _
            pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD WillMove <15> (BYVAL adReason AS LONG, BYREF IN adStatus AS LONG, BYVAL pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD MoveComplete <16> (BYVAL adReason AS LONG, BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pRecordset _
            AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD EndOfRecordset <17> (BYREF IN fMoreData AS INTEGER, BYREF IN adStatus AS LONG, BYVAL pRecordset AS _
            Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD FetchProgress <18> (BYVAL Progress AS LONG, BYVAL MaxProgress AS LONG, BYREF IN adStatus AS LONG, BYVAL _
            pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
            METHOD FetchComplete <19> (BYVAL pError AS Int_Error, BYREF IN adStatus AS LONG, BYVAL pRecordset AS Int__Recordset)
                ' Insert your code here
            END METHOD
    
        END INTERFACE
    END CLASS
    
    ' Interface Name  : Int__Record
    ' ClassID         : $CLSID_ADODB_Record
    ' ProgID          : $PROGID_ADODB_Record
    ' Version ProgID  : $PROGID_ADODB_Record8
    INTERFACE IDBIND Int__Record
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActiveConnection <1> () AS VARIANT
        MEMBER LET ActiveConnection <1> (IN Rhs AS STRING<0>)
        MEMBER LET PutRef_ActiveConnection <1> (IN Rhs AS Int__Connection<0>)
        MEMBER GET STATE <2> () AS LONG
        MEMBER GET SOURCE <3> () AS VARIANT
        MEMBER LET SOURCE <3> (IN Rhs AS STRING<0>)
        MEMBER LET PutRef_Source <3> (IN Rhs AS IDISPATCH<0>)
        MEMBER GET MODE <4> () AS LONG
        MEMBER LET MODE <4> (IN Rhs AS LONG<0>)
        MEMBER GET ParentURL <5> () AS STRING
        MEMBER CALL MoveRecord <6> (OPT IN SOURCE AS STRING<0>, OPT IN Destination AS STRING<1>, OPT IN UserName AS STRING<2>, _
            OPT IN Password AS STRING<3>, OPT IN Options AS LONG<4>, OPT IN Async AS INTEGER<5>) AS STRING
        MEMBER CALL CopyRecord <7> (OPT IN SOURCE AS STRING<0>, OPT IN Destination AS STRING<1>, OPT IN UserName AS STRING<2>, _
            OPT IN Password AS STRING<3>, OPT IN Options AS LONG<4>, OPT IN Async AS INTEGER<5>) AS STRING
        MEMBER CALL DeleteRecord <8> (OPT IN SOURCE AS STRING<0>, OPT IN Async AS INTEGER<1>)
        MEMBER CALL OPEN <9> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN MODE AS LONG<2>, OPT IN _
            CreateOptions AS LONG<3>, OPT IN Options AS LONG<4>, OPT IN UserName AS STRING<5>, OPT IN Password AS STRING<6>)
        MEMBER CALL CLOSE <10> ()
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET RecordType <11> () AS LONG
        MEMBER CALL GetChildren <12> () AS Int__Recordset
        MEMBER CALL CANCEL <13> ()
        MEMBER GET ActiveConnection <1> () AS VARIANT
        MEMBER LET ActiveConnection <1> (IN pvar AS STRING<0>)
        MEMBER LET PutRef_ActiveConnection <1> (IN pvar AS Int__Connection<0>)
        MEMBER GET STATE <2> () AS LONG
        MEMBER GET SOURCE <3> () AS VARIANT
        MEMBER LET SOURCE <3> (IN pvar AS STRING<0>)
        MEMBER LET PutRef_Source <3> (IN pvar AS IDISPATCH<0>)
        MEMBER GET MODE <4> () AS LONG
        MEMBER LET MODE <4> (IN pMode AS LONG<0>)
        MEMBER GET ParentURL <5> () AS STRING
        MEMBER CALL MoveRecord <6> (OPT IN SOURCE AS STRING<0>, OPT IN Destination AS STRING<1>, OPT IN UserName AS STRING<2>, _
            OPT IN Password AS STRING<3>, OPT IN Options AS LONG<4>, OPT IN Async AS INTEGER<5>) AS STRING
        MEMBER CALL CopyRecord <7> (OPT IN SOURCE AS STRING<0>, OPT IN Destination AS STRING<1>, OPT IN UserName AS STRING<2>, _
            OPT IN Password AS STRING<3>, OPT IN Options AS LONG<4>, OPT IN Async AS INTEGER<5>) AS STRING
        MEMBER CALL DeleteRecord <8> (OPT IN SOURCE AS STRING<0>, OPT IN Async AS INTEGER<1>)
        MEMBER CALL OPEN <9> (OPT IN SOURCE AS VARIANT<0>, OPT IN ActiveConnection AS VARIANT<1>, OPT IN MODE AS LONG<2>, OPT IN _
            CreateOptions AS LONG<3>, OPT IN Options AS LONG<4>, OPT IN UserName AS STRING<5>, OPT IN Password AS STRING<6>)
        MEMBER CALL CLOSE <10> ()
        MEMBER GET Fields <0> () AS Fields
        MEMBER GET RecordType <11> () AS LONG
        MEMBER CALL GetChildren <12> () AS Int__Recordset
        MEMBER CALL CANCEL <13> ()
    END INTERFACE
    
    ' Interface Name  : Int__Stream
    ' ClassID         : $CLSID_ADODB_Stream
    ' ProgID          : $PROGID_ADODB_Stream
    ' Version ProgID  : $PROGID_ADODB_Stream8
    INTERFACE IDBIND Int__Stream
        MEMBER GET SIZE <1> () AS LONG
        MEMBER GET EOS <2> () AS INTEGER
        MEMBER GET Position <3> () AS LONG
        MEMBER LET Position <3> (IN pPos AS LONG<0>)
        MEMBER GET TYPE <4> () AS LONG
        MEMBER LET TYPE <4> (IN ptype AS LONG<0>)
        MEMBER GET LineSeparator <5> () AS LONG
        MEMBER LET LineSeparator <5> (IN pLS AS LONG<0>)
        MEMBER GET STATE <6> () AS LONG
        MEMBER GET MODE <7> () AS LONG
        MEMBER LET MODE <7> (IN pMode AS LONG<0>)
        MEMBER GET Charset <8> () AS STRING
        MEMBER LET Charset <8> (IN pbstrCharset AS STRING<0>)
        MEMBER CALL READ <9> (OPT IN NumBytes AS LONG<0>) AS VARIANT
        MEMBER CALL OPEN <10> (OPT IN SOURCE AS VARIANT<0>, OPT IN MODE AS LONG<1>, OPT IN Options AS LONG<2>, OPT IN UserName _
            AS STRING<3>, OPT IN Password AS STRING<4>)
        MEMBER CALL CLOSE <11> ()
        MEMBER CALL SkipLine <12> ()
        MEMBER CALL WRITE <13> (IN Buffer AS VARIANT<0>)
        MEMBER CALL SetEOS <14> ()
        MEMBER CALL CopyTo <15> (IN DestStream AS Int__Stream<0>, OPT IN CharNumber AS LONG<1>)
        MEMBER CALL FLUSH <16> ()
        MEMBER CALL SaveToFile <17> (IN FileName AS STRING<0>, OPT IN Options AS LONG<1>)
        MEMBER CALL LoadFromFile <18> (IN FileName AS STRING<0>)
        MEMBER CALL ReadText <19> (OPT IN NumChars AS LONG<0>) AS STRING
        MEMBER CALL WriteText <20> (IN PB_Data AS STRING<0>, OPT IN Options AS LONG<1>)
        MEMBER CALL CANCEL <21> ()
    END INTERFACE
    
    ' Interface Name  : ADORecordConstruction
    INTERFACE IDBIND ADORecordConstruction
        MEMBER GET Row <1610743808> () AS IUNKNOWN
        MEMBER LET Row <1610743808> (IN ppRow AS IUNKNOWN<0>)
        MEMBER LET ParentRow <1610743810> (IN Rhs AS IUNKNOWN<0>)
    END INTERFACE
    
    ' Interface Name  : ADOStreamConstruction
    INTERFACE IDBIND ADOStreamConstruction
        MEMBER GET Stream <1610743808> () AS IUNKNOWN
        MEMBER LET Stream <1610743808> (IN ppStm AS IUNKNOWN<0>)
    END INTERFACE
    
    ' Interface Name  : ADORecordsetConstruction
    INTERFACE IDBIND ADORecordsetConstruction
        MEMBER GET Rowset <1610743808> () AS IUNKNOWN
        MEMBER LET Rowset <1610743808> (IN ppRowset AS IUNKNOWN<0>)
        MEMBER GET Chapter <1610743810> () AS LONG
        MEMBER LET Chapter <1610743810> (IN plChapter AS LONG<0>)
        MEMBER GET RowPosition <1610743812> () AS IUNKNOWN
        MEMBER LET RowPosition <1610743812> (IN ppRowPos AS IUNKNOWN<0>)
    END INTERFACE
    
    ' Interface Name  : Field15
    INTERFACE IDBIND Field15
        MEMBER GET Properties <500> () AS Properties
        MEMBER GET ActualSize <1109> () AS LONG
        MEMBER GET Attributes <1114> () AS LONG
        MEMBER GET DefinedSize <1103> () AS LONG
        MEMBER GET NAME <1100> () AS STRING
        MEMBER GET TYPE <1102> () AS LONG
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN Rhs AS VARIANT<0>)
        MEMBER GET Precision <1112> () AS BYTE
        MEMBER GET NumericScale <1113> () AS BYTE
        MEMBER CALL AppendChunk <1107> (IN PB_Data AS VARIANT<0>)
        MEMBER CALL GetChunk <1108> (IN Length AS LONG<0>) AS VARIANT
        MEMBER GET OriginalValue <1104> () AS VARIANT
        MEMBER GET UnderlyingValue <1105> () AS VARIANT
        MEMBER GET ActualSize <1109> () AS LONG
        MEMBER GET Attributes <1114> () AS LONG
        MEMBER GET DefinedSize <1103> () AS LONG
        MEMBER GET NAME <1100> () AS STRING
        MEMBER GET TYPE <1102> () AS LONG
        MEMBER GET Value <0> () AS VARIANT
        MEMBER LET Value <0> (IN pvar AS VARIANT<0>)
        MEMBER GET Precision <1112> () AS BYTE
        MEMBER GET NumericScale <1113> () AS BYTE
        MEMBER CALL AppendChunk <1107> (IN PB_Data AS VARIANT<0>)
        MEMBER CALL GetChunk <1108> (IN Length AS LONG<0>) AS VARIANT
        MEMBER GET OriginalValue <1104> () AS VARIANT
        MEMBER GET UnderlyingValue <1105> () AS VARIANT
    END INTERFACE
    SAMPLE COMMAND FILE
    Code:
    THISFILE=acommand.txt
    XXORACLE Provider=ORAOLEDB.Oracle.
    XXJET    PROVIDER = Microsoft.Jet.OLEDB.4.0
    XX      ==================================================
    XCONNECT=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Testdata\ptmn\db\jet\ptmn.mdb;User Id=admin;Password=;
    XQUERY=Select * from batch_Proc
    CONNECT=Provider=ORAOLEDB.Oracle;Data Source=XE;User ID=xxxx;Password=xxxx
    QUERY=Select * from batcH_proc
    XQUERY=Select nvl (last_name, 'No Last Name'), nvl(first_name,'No First Name'), pers_no from pers order by 3
    XQUERY=Select seg_no, user_seg_no from seg order by 1
    Last edited by Michael Mattias; 8 Nov 2008, 11:02 AM. Reason: Bug fix, enhancement and cleanup (11/6/08 and 11/08/08)
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

  • #2
    Updates 11/6/08

    Demo program: cleaned up comments. Added Public Domain Statement

    ADOEXECTUTESELECT: Fixed bug in retrieval of column names. Added explicit handing of type VT_BOOL in fetch loop to returns "0" or "1" (NOT TESTED); cleaned up comments; added public domain statement. Add time to returned date when VT_DATE but only if time included in what is returned.


    MCM
    Last edited by Michael Mattias; 6 Nov 2008, 11:35 AM.
    Michael Mattias
    Tal Systems Inc. (retired)
    Racine WI USA
    [email protected]
    http://www.talsystems.com

    Comment


    • #3
      CHANGES/UPDATES 11/8/08

      11/10/08: Change comment re USING$ from "compiler bug" to "documented limitation missed by author."

      ADOEXECUTESELECT.INC.
      Test oRS recordset state at end of fetch loop and if open, close it.
      (It WAS open at end of succesful fetch loop).

      New Demo Program ADODEMO2
      • Recompiled with new ADOEXECUTESELECT.INC file (just to test, obviously does not apply to Source Code posting)
      • Does not hold console open or provide terminating MSGBOX at end except when parameter error when compiled with PB/CC
      • Don't use USING$ function to print query report file, as the string returned by USING$ is documented as limited to 1024 bytes. [Had previously commented that this was a bug in compiler]
      • New syntax for query in command file. Instead of 'QUERY=string' on one line, uses a BEGINQUERY/ENDQUERY block structure:
        Code:
        BEGINQUERY
                 select X, 
                        Y, 
                        Z, 
                        A, 
                        B, 
                        C, 
               from     t1, 
                        t2
               where    whatever
               group by something
               order by  something
        ENDQUERY
        Have not yet found a DBMS which does not handle the resulting white space in the passed query string, Tested OK so far: Access/Jet, Oracle 10g/ORAOLEDB, Oracle 8i/MSDAORA, Microsoft SQL Server/sqloledb.


      THE #INCLUDE file ADOExecuteSelect.INC is changed in post #1

      The new demo program is here.

      MCM
      UPDATED DEMO PROGRAM

      Code:
      ' ADODEMO2.BAS
      ' Demonstration of "generic" "SELECT " SQL statement use of function "ADOExecuteSelect"
      ' Date: 11-02-08
      ' 11-05-08      clean up comments; changes to ADOEXECUTESELECT.INC
      '               Fix bug in adoexecuteselect in column names.
      ' 11/07/08      Change front end: instead of QUERY=  we use a block structiure
      '               BEGINQUERY   on its own line
      '                query lines here
      '               ENDQUERY     on its own line.
      '               QUery can can have whitespace and newline; the DBMS is responsible for sorting this out.
      ' 11/08/08      DOn't print query with USING$ function to workaround bug in PB/CC 5.0
      '               Test for recordset open in #INCLUDE file and call close method if necessary.
      '               NEEDS TO BE RENAMED and versioned.
      
      ' Author: Michael Mattias Racine WI
      ' Use and Distrubution: PLaced in public domain by author 11/5/08.
      ' Thanks to: Fred Harris for starter ADO program. Jose Roca for tips re using new IDISPINFO object
      ' Compilers: PB/CC version 5 or PB/WIn 9. Compiles and runs on either 'as is'
      ' USAGE from command line:
      '    C:\> Start  adodemo.exe commandfilename
      ' Program edits commandfilename for the strings QUERY= and CONNECT=, then executes the function "ADoExecuteSelect"
      '  which returns a filled dynamic string array.
      ' =========================================
      ' USEFUL/COMMON OLEDB Connection strings;
      ' Oracle: Provider=ORAOLEDB.Oracle;Data Source=<service name>;User ID=Xxxxxx;Password=xxxxx
      ' Jet/Access:Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Testdata\ptmn\db\jet\ptmn.mdb;User Id=admin;Password=;
      ' MS EXCEL LProvider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";
      '
      ' Others: http://www.connectionstrings.com
      ' See supplied test file "acommand.txt"
      ' ===============================================
      
      
      #COMPILE  EXE
      #COMPILER PBCC 5, PBWIN 9
      #DIM      ALL
      #TOOLS    OFF
      ' #DEBUG not on here, as I want a GPF immediately if I am corrupting memory.
      
      #INCLUDE "ADOEXECUTESELECT.INC" ' file created just for this demo
      '  this will incude #INCLUDE   "ADODB28DISP.INC"  ' regenerated with CC5 com browser "dispatch only"
      ' has to go this way due to the way some MACROs are generated by COM browser.
      
      #IF NOT %DEF(%VT_DECIMAL)
        %VT_DECIMAL = 14
      #ENDIF
      #IF NOT %DEF (%WINAPI)
         #INCLUDE   "Win32Api.inc"
      #ENDIF
      
      ' where progress info and data from select are deposited. FIle is opened with NOtePad at end.
      $RESULT_FILE  =  "ADODEMO_LOG.TXT"
      
      FUNCTION PBMAIN() AS LONG
      
          LOCAL sCmdFile AS STRING
          LOCAL sBuff AS STRING, sKEy AS STRING
          LOCAL sConnect AS STRING, sQuery AS STRING
          LOCAL hIn     AS LONG, iPos AS LONG
          LOCAL sRow() AS STRING, nRow AS LONG, nCol AS LONG, iRow AS LONG, iCol AS LONG
          LOCAL sErrMsg AS STRING
          LOCAL sResultFile AS STRING,hResult AS LONG
          LOCAL iRet AS LONG
          LOCAL bInBlock AS LONG, Z AS LONG
          LOCAL iUseError AS LONG
      
          sResultFile =  $RESULT_FILE
      
          sCMDFile = TRIM$(COMMAND$)
          bINblock = %FALSE
      
          IF DIR$(sCmdFile) > "" THEN
              hIN =   FREEFILE
              OPEN    sCmdFile  FOR INPUT AS hIn
              WHILE NOT EOF(hIN)
                  LINE INPUT #hIn, sBUFF
                  IF UCASE$(TRIM$(sBuff)) = "BEGINQUERY" THEN
                       bINbLock = %TRUE
                       sQUery   = ""  ' reset
                  ELSEIF UCASE$(TRIM$(sBuff)) = "ENDQUERY" THEN
                       bINblock = %FALSE
                  ELSEIF UCASE$(LEFT$(TRIM$(sBuff),8)) = "CONNECT=" THEN
                         sCOnnect = MID$(sBUff, 9)
                  ELSE
                       IF ISTRUE bInBlock THEN
                            sQuery = sQuery & $CRLF & sBUff
                       END IF
                  END IF
              WEND
              CLOSE hIn
          ELSE
             ? USING$("Command file '&' not found", sCmdFile)
             iUseError = %TRUE
             GOTO  WinMainExit
          END IF
      
          IF LEN(sConnect) = 0 THEN
            ? "No 'CONNECT=' record found in command file"
            iUseError = %TRUE    ' error
            GOTO WinMainExit
          END IF
      
          IF LEN(sQuery) = 0 THEN
            ? "No 'BEGINQUERY/ENDQUERY Text found in command file"
            iUseError = %TRUE    ' error
            GOTO WinMainExit
          END IF
      
          ' ------------------------
          ' START RESULT FILE HERE
          ' ------------------------
          hResult = FREEFILE
          OPEN      sResultFile FOR OUTPUT AS hResult
          PRINT #hResult, USING$ ("ADO Demo begins at & on &", TIME$, DATE$)
          PRINT #hResult, USING$ ("Connection string '&'", sConnect)
          ' test 11/7/08 long queries are getting truncated
          ' COMPILER BUG!!!! FOUND 11/7/08, PRints all of the query  f we don't use USING$ function
          
          PRINT# hResult, "Query:"
          
          ' PRINT #hResult, "Query PRINTED 'AS STRING' starts next line"
          PRINT #hResult, sQuery
          'PRINT #hResult, "Query PRINTED with USING$ function starts next line"
          'PRINT #hResult, USING$ ("Query '&'", sQuery)
          ' something is cutting off the end of this query when printing here, but not when when sending to function?
          ' limited to some length? Need to test here too hard to test at cloyes.
          PRINT #hResult,
      
      
          ' -------------------------------------
          ' Create array to hold query results
          ' ------------------------------------
          REDIM  sRow(0,0)
      
          CALL AdoExecuteSelect (BYVAL STRPTR(sConnect), BYVAL STRPTR(sQuery), sRow(), sErrMsg) TO iRet
      
          PRINT #hResult, USING$ ( "AdoExecuteSelect returns # &", iRet, IIF$(iRet, "ERROR", "SUCCESS"))
      
          IF ISTRUE iRet THEN
               PRINT #hResult, "ERROR MESSAGE:" & sErrMsg
          ELSE
               ncol = UBOUND(sRow,1)
               nRow = UBOUND(sRow,2)
               PRINT #hResult, USING$ ("QUery returned # columns and # rows", nCol, nRow)
               PRINT #hResult,
               PRINT #hResult, "COLUMN NAMES"
               FOR iCol = 1 TO nCol
                    PRINT #hResult, sRow(iCol, 0);
                    IF icol <> nCol THEN
                         PRINT #hResult, ",";
                    END IF
               NEXT
               PRINT #hresult,
      
               ' ---------------------------------------
               ' now show data, comma separated
               ' ---------------------------------------
               FOR iRow = 1 TO nRow
                    PRINT #hResult,
                    FOR iCol = 1 TO nCol
                         PRINT #hResult, sRow (iCol, iRow);
                         IF iCol <> nCol THEN
                              PRINT #hResult, ",";
                         END IF
                    NEXT
               NEXT
               PRINT #hResult,
      
         END IF
      
         PRINT #hResult, "** END OF REPORT **"
         CLOSE hREsult
      
      
      
         Z= SHELL ("Notepad.exe " & sResultFile)
      
      
      WinMainExit:
      ' if PB/CC and error, hold screen
       #IF %DEF(%PB_CC32)
         IF ISTRUE iUseError THEN
            STDOUT  "Command line or command file error occurred; press any key to exit"
            WAITKEY$
         END IF
      #ENDIF
        FUNCTION = iRet
      
      END FUNCTION
      
      
      '' ///  *** END OF FILE *****
      Last edited by Michael Mattias; 10 Nov 2008, 08:56 AM.
      Michael Mattias
      Tal Systems Inc. (retired)
      Racine WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        UPDATES 11-28-08

        Since you can't edit a post this old, best I can do here is give you the changes:

        Add support for Microsoft Sql Server 'nVarChar' fields.
        These are returned by ADO 2.7/2.8 as VARIANTVT value (%VT_ARRAY OR %VT_UI1) (8209 decimal or hex 0x2011)

        1. Add these DECLARE statements (Anywhere, ADOEXECUTESELECT.INC suggested)
        Code:
        DECLARE FUNCTION SafeArrayGetDim     LIB "OLEAUT32.DLL" ALIAS "SafeArrayGetDim"     (BYVAL psa AS DWORD) AS DWORD
        DECLARE FUNCTION SafeArrayGetElement LIB "OLEAUT32.DLL" ALIAS "SafeArrayGetElement" (BYVAL psa AS DWORD, rgIndices AS LONG, pData AS ANY) AS LONG
        DECLARE FUNCTION SafeArrayGetLBound  LIB "OLEAUT32.DLL" ALIAS "SafeArrayGetLBound"  (BYVAL psa AS DWORD, BYVAL nDim AS WORD, lbDim AS LONG) AS LONG
        DECLARE FUNCTION SafeArrayGetUBound  LIB "OLEAUT32.DLL" ALIAS "SafeArrayGetUBound"  (BYVAL psa AS DWORD, BYVAL nDim AS WORD, ubDim AS LONG) AS LONG
        Or simply #INCLUDE PowerBasic-Provided "VBAPI32.INC"

        2. Those declares support this function which can be #INCLUDEd or pasted into (anywhere, ADOEXECUTESELECT.INC suggested)
        Code:
        '-----------------------------------------------------------------------
        ' GET SQL Server 'nVarChar' field when returned 
        ' Returned by ADO as (VT_ARRAY|VT_UI1) (8209 decimal, 0x2011) 
        ' V assumed to have type VT_ARRAY|VT_UI1 or VT_ARRAY|VT_I1  (Byte array)
        ' -----------------------------------------------------------------------
        
        FUNCTION GetVTByteArrayAsString (v AS VARIANT) AS STRING
        
         LOCAL nDim AS LONG
        
         LOCAL pV  AS VARIANTAPI PTR
         LOCAL lb AS LONG, ub AS LONG
         LOCAL pSA   AS DWORD
         LOCAL  iRet AS LONG
         LOCAL B AS STRING , i AS LONG
         LOCAL pb AS BYTE PTR
        
        
         pV     =    VARPTR (v)    ' pointer to VARIANTAPI structure
        
         ' get pointer to the safearray descriptor
           pSA  =  @pV.VD.psArray      ' the variant data are a pointer to the safearray descriptor
         ' get the lbound and ubound
         ' should return S_OK (0) on success.It  does 
           iRet = SafeArrayGetLbound(BYVAL pSA, 1, lb)
           iRet = SafeArrayGEtUbound (BYVAL pSA, 1, ub)
          ' could verify element size as 1 here... wuth SafeArrayGetElemSize.. except
          ' we already know its one because it's type "UI1"
          ' initialize a buffer full of nuls to hold the characters:
           B  =  STRING$ (ub-lb+1, 0)
        '  set the initial destination for the array element data
           pB   =  STRPTR(B)
           FOR   i = LB TO UB    ' for each element of the array
              iRet= SafeArrayGetElement (BYVAL pSa, i, BYVAL pb)  ' deposit element at address 'pb'
              ' success = S_OK
              INCR  pb  ' set up so next element goes at next position.
           NEXT
        
           FUNCTION = B   ' return the filled string
        END FUNCTION

        3. In ADOEXECUTESELECT.INC, add the new highlighted code (labels optional) at the indicated point:
        Code:
        ...
                 FOR iCol    = 0 TO nCol-1             ' we got nCol earlier; now get each column of data in this row
                     LET vCOlIndex   =  icol           ' which column
                     OBJECT GET Ors.Fields.Item(vColIndex).Value TO vValue
                      ' Format to a string based on the data type
                     SELECT CASE VARIANTVT (vValue)
        NEWCODE:
                        CASE (%VT_ARRAY OR %VT_UI1), ( %VT_ARRAY OR %VT_I1)
        
                             sValue =GetVtBYteArrayAsString (vValue) 
        
        ENDNEWCODE:
                        CASE %VT_EMPTY
                            sValue = ""
                        CASE %VT_NULL
                            sValue = ""    ' we get %VT_NULL if column is null. PB Help does not suggested testing
                                           ' this but I do.
        .....
        MCM
        Michael Mattias
        Tal Systems Inc. (retired)
        Racine WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          ' initialize a buffer full of nuls to hold the characters:
          B = STRING$ (ub-lb+1, 0)
          ' set the initial destination for the array element data
          pB = STRPTR(B)
          FOR i = LB TO UB ' for each element of the array
          iRet= SafeArrayGetElement (BYVAL pSa, i, BYVAL pb) ' deposit element at address 'pb'
          ' success = S_OK
          INCR pb ' set up so next element goes at next position.
          NEXT
          This should be faster:

          Code:
          LOCAL pData AS DWORD
          ' Lock the safearray for access
          SafeArrayAccessData(pSa, pData)
          IF pData THEN
             ' Read the data
             B = PEEK$(pData, ub-lb+1)  ' Or use CopyMemory
             ' Unlock the array
             SafeArrayUnaccessData(pSa)
          END IF
          Forum: http://www.jose.it-berater.org/smfforum/index.php

          Comment


          • #6
            "First you make it work. Only then do you make it work better. "

            Whoever said that surely was wise.
            Michael Mattias
            Tal Systems Inc. (retired)
            Racine WI USA
            [email protected]
            http://www.talsystems.com

            Comment


            • #7
              My apologies for trying to help you. Won't do it again.
              Forum: http://www.jose.it-berater.org/smfforum/index.php

              Comment


              • #8
                Ok, it's Monday morning and I am still a bit foggy, but where are SafeArrayAccessData() and SafeArrayUnaccessData() declared?
                Anthony W. J. Giambalvo
                Giami Network Services, LLC
                North Plainfield, NJ USA
                Email: anthony dot powerbasic at giami dot com

                Comment


                • #9
                  Never mind. Again the fog has not yet cleared. Found the MSDN link here: http://msdn.microsoft.com/library/de...chap7_1rvp.asp

                  Also, Jose generously converted this for us already at: http://www.powerbasic.com/support/pb...d.php?p=146936

                  Thanks Michael and Jose.
                  Anthony W. J. Giambalvo
                  Giami Network Services, LLC
                  North Plainfield, NJ USA
                  Email: anthony dot powerbasic at giami dot com

                  Comment


                  • #10
                    Wrong forum I know but...

                    For the record, I do not create demos for 'maximum speed.'

                    My two guiding principles are
                    1. Maximum usabillity - so it's easy to compile and 'see what it does'
                    2. Maximum understandability - so it's easy to learn from, modify, and apply to a specific application.

                    That alternate code might be faster is a conscious decision I make when putting these things together, and it is a price I am willing to pay.

                    MCM
                    Michael Mattias
                    Tal Systems Inc. (retired)
                    Racine WI USA
                    [email protected]
                    http://www.talsystems.com

                    Comment


                    • #11
                      Looking for the latest version of Jose ADO.Inc

                      Jose if you are monitoring this forum. I am lookin for the latest version of your ADO.Inc file. Is it available?

                      I was on you site today trying to run some of your exampls but I do not have your latest ADO.inc file.

                      Comment


                      • #12
                        Originally posted by Michael Mattias View Post
                        "First you make it work. Only then do you make it work better. "

                        Whoever said that surely was wise.

                        A "Thank you, yes indeed." would be more constructive [...]. It looks if members has to wear silk gloves when helping each other.
                        If something must done the proper way you must do it yourself.

                        Comment


                        • #13
                          12/15/09 BUG FIX
                          For file ADOExecuteSelect.inc

                          Code:
                          ' 11.25.09       When returning value of select in either select or in RecordSetToStringArray, do not 'movefirst'
                          '                if already at EOF (query succeeded but returned no rows).
                          Since I can't edit the code, Here is what you have to do in the fetch loop in ADOExecuteSelect.inc:

                          Instead of:
                          Code:
                                ' -----------------------------------------------------
                                ' now we get the actual returned datarows
                                ' ------------------------------------------------------
                                nRow     = 0                       ' Number of DATA rows (the sRow() row subscript) we read
                                OBJECT CALL oRS.MoveFirst          ' position the cursor
                                DO                                 ' perform FETCH loop
                                   OBJECT GET oRs.EOF  TO vEOF
                                   IF ISTRUE VARIANT#(vEof) THEN
                                     ' Exit the fetch loop
                                       EXIT DO
                                   END IF
                                   .....
                          You need to:
                          Code:
                                ' -----------------------------------------------------
                                ' now we get the actual returned datarows
                                ' ------------------------------------------------------
                                nRow     = 0                       ' Number of DATA rows (the sRow() row subscript) we read
                                OBJECT GET oRs.EOF  TO vEOF        ' must test for EOF BEFORE doing oRS.MoveFirst to avoid ERR 99
                                IF ISFALSE VARIANT#(vEof) THEN
                                     OBJECT CALL oRS.MoveFirst          ' position the cursor
                                END IF
                                DO                                 ' perform FETCH loop
                                   OBJECT GET oRs.EOF  TO vEOF
                                   IF ISTRUE VARIANT#(vEof) THEN
                                     ' Exit the fetch loop
                                       EXIT DO
                                   END IF
                                   ....
                          You can restructure the loop to make one less "GET" of oRs.EOF if you want.

                          If you do the MoveFirst when at end (e.g. when query succeeds but returns zero rows) , you get an exception and "error 99 object error" is set.

                          MCM
                          Michael Mattias
                          Tal Systems Inc. (retired)
                          Racine WI USA
                          [email protected]
                          http://www.talsystems.com

                          Comment

                          Working...
                          X