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

📄 coutputidentification.cls

📁 Data monkey是一个强大的是数据传输和转换应用程序。使用DataMonkey用户可以把复杂的文本文件格式
💻 CLS
📖 第 1 页 / 共 2 页
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "COutputIdentification"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "SavedWithClassBuilder" ,"Yes"
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
' DataMonkey Data Conversion Application. Written by Theodore L. Ward
' Copyright (C) 2002 AstroComma Incorporated.
'
' This program is free software; you can redistribute it and/or
' modify it under the terms of the GNU General Public License
' as published by the Free Software Foundation; either version 2
' of the License, or (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
' The author may be contacted at:
' TheodoreWard@Hotmail.com or TheodoreWard@Yahoo.com

' These are the types that a variant can contain/convert.
Enum rdtReducedDataTypeSet
    rdtNull
    rdtBool
    rdtByte
    rdtCurrency
    rdtDate
    rdtDouble
    rdtDecimal
    rdtInteger
    rdtLong
    rdtSingle
    rdtVariant
    rdtString
    rdtItemCount
End Enum

Enum otOutputSourceType
    otNONE = 1
    otASCII
    otDB
    otXML
    'otOTHER = 10
End Enum

' Dimension offsets into the CmdID array.
Private Const DEF_NAME = 1
Private Const DEF_DESCRIPTION = 2
Private Const DEF_TYPE = 3

' Array to hold names and descriptions.
Private mOSRC As New Collection
Private mOTYP As New Collection

Private Sub Class_Initialize()

    ' Manually set the string arrays with descriptive
    ' messages telling of how data may be identified.
    FillInOutputSources
    FillInDBTypes
    
End Sub

'***********************************************************
' Describe the different types of Database Types we support.
'***********************************************************
Private Sub FillInDBTypes()
    Dim tKey As String
    
    ' ALWAYS ADD ITEMS IN THE ORDER:
    ' DEF_NAME, DEF_DESCRIPTION, DEF_TYPE
    ' SO THAT WE CAN CALCULATE THE INDEX INTO THE COLLECTION
    ' BY MY MULTIPLYING BY 3 AND ADDING THE OFFSET (NAME, DESC OR TYPE)
    
    tKey = CStr(ADODB.adEmpty)
    mOTYP.Add "NONE", tKey + CStr(DEF_NAME)
    mOTYP.Add "Unspecified", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adEmpty, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adBigInt)
    mOTYP.Add "LONG INTEGER", tKey + CStr(DEF_NAME)
    mOTYP.Add "8 byte signed integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adBigInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adInteger)
    mOTYP.Add "INTEGER", tKey + CStr(DEF_NAME)
    mOTYP.Add "4 byte signed integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adInteger, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adSmallInt)
    mOTYP.Add "SMALL INTEGER", tKey + CStr(DEF_NAME)
    mOTYP.Add "2 byte signed integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adSmallInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adTinyInt)
    mOTYP.Add "TINY INTEGER", tKey + CStr(DEF_NAME)
    mOTYP.Add "1 byte signed integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adTinyInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adUnsignedTinyInt)
    mOTYP.Add "UNSIGNED TINY INT", tKey + CStr(DEF_NAME)
    mOTYP.Add "A 1 byte unsigned integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adUnsignedTinyInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adUnsignedSmallInt)
    mOTYP.Add "UNSIGNED SMALL INT", tKey + CStr(DEF_NAME)
    mOTYP.Add "A 2 byte unsigned integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adUnsignedSmallInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adUnsignedInt)
    mOTYP.Add "UNSIGNED INT", tKey + CStr(DEF_NAME)
    mOTYP.Add "A 4 byte unsigned integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adUnsignedInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adUnsignedBigInt)
    mOTYP.Add "UNSIGNED BIG INT", tKey + CStr(DEF_NAME)
    mOTYP.Add "A 4 byte unsigned integer", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adUnsignedBigInt, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adDecimal)
    mOTYP.Add "DECIMAL", tKey + CStr(DEF_NAME)
    mOTYP.Add "An exact numeric value with a fixed precision and scale", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adDecimal, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adDouble)
    mOTYP.Add "DOUBLE", tKey + CStr(DEF_NAME)
    mOTYP.Add "8 byte real", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adDouble, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adSingle)
    mOTYP.Add "SINGLE", tKey + CStr(DEF_NAME)
    mOTYP.Add "4 byte real", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adSingle, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adNumeric)
    mOTYP.Add "NUMERIC", tKey + CStr(DEF_NAME)
    mOTYP.Add "An exact numeric value with a fixed precision and scale", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adNumeric, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adBoolean)
    mOTYP.Add "BOOLEAN", tKey + CStr(DEF_NAME)
    mOTYP.Add "True/False", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adBoolean, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adBinary)
    mOTYP.Add "BINARY", tKey + CStr(DEF_NAME)
    mOTYP.Add "A binary value", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adBinary, tKey + CStr(DEF_TYPE)

    tKey = CStr(ADODB.adChar)
    mOTYP.Add "STRING", tKey + CStr(DEF_NAME)
    mOTYP.Add "A string value", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adChar, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adDate)
    mOTYP.Add "DATE", tKey + CStr(DEF_NAME)
    mOTYP.Add "A date stored as a double, the whole part of which is the number of days since December 30, 1899, and the fractional part of which is the fraction of a day", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adDate, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adCurrency)
    mOTYP.Add "CURRENCY", tKey + CStr(DEF_NAME)
    mOTYP.Add "A fixed-point number with four digits to the right of the decimal point. It is stored in an 8 byte signed integer scaled by 10,000", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adCurrency, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adDBTime)
    mOTYP.Add "TIME", tKey + CStr(DEF_NAME)
    mOTYP.Add "A time value (hhmmss)", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adDBTime, tKey + CStr(DEF_TYPE)
    
    tKey = CStr(ADODB.adDBTimeStamp)
    mOTYP.Add "TIMESTAMP", tKey + CStr(DEF_NAME)
    mOTYP.Add "A date-time stamp (yyyymmddhhmmss plus a fraction in billionths)", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adDBTimeStamp, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adError)
    mOTYP.Add "ERROR CODE", tKey + CStr(DEF_NAME)
    mOTYP.Add "A 32 bit error code", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adError, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adUserDefined)
    mOTYP.Add "USER DEFINED", tKey + CStr(DEF_NAME)
    mOTYP.Add "A user defined variable", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adUserDefined, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adVariant)
    mOTYP.Add "VARIANT", tKey + CStr(DEF_NAME)
    mOTYP.Add "An Automation Variant", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adVariant, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adIDispatch)
    mOTYP.Add "IDISPATCH", tKey + CStr(DEF_NAME)
    mOTYP.Add "A pointer to an IDispatch interface on an OLE object", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adIDispatch, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adIUnknown)
    mOTYP.Add "IUNKNOWN", tKey + CStr(DEF_NAME)
    mOTYP.Add "A pointer to an IUnknown interface on an OLE object", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adIUnknown, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adGUID)
    mOTYP.Add "GUID", tKey + CStr(DEF_NAME)
    mOTYP.Add "A globally unique identifier", tKey + CStr(DEF_DESCRIPTION)
    mOTYP.Add ADODB.adGUID, tKey + CStr(DEF_TYPE)
        
    tKey = CStr(ADODB.adBSTR)

⌨️ 快捷键说明

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