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

📄 coutputfieldproxy.cls

📁 Data monkey是一个强大的是数据传输和转换应用程序。使用DataMonkey用户可以把复杂的文本文件格式
💻 CLS
字号:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "COutputFieldProxy"
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

Option Explicit

'local variable(s) to hold property value(s)
Private mValue As Variant
Private mName As String
Private mType As Integer

Public Property Let name(ByVal vData As String)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.name = 5
    mName = vData
End Property

Public Property Get name() As String
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.name
    name = mName
End Property

Public Property Let value(ByVal vData As Variant)
'used when assigning a value to the property, on the left side of an assignment.
'Syntax: X.value = 5
    mValue = vData
    fixupStringValue
End Property

Public Property Set value(ByVal vData As Object)
'used when assigning an Object to the property, on the left side of a Set statement.
'Syntax: Set x.value = Form1
    Set mValue = vData
End Property

Public Property Get value() As Variant
Attribute value.VB_UserMemId = 0
'used when retrieving value of a property, on the right side of an assignment.
'Syntax: Debug.Print X.value
    If IsObject(mValue) Then
        Set value = mValue
    Else
        value = mValue
    End If
End Property

Public Property Let dbType(newType As Integer)
    mType = newType
End Property
Public Property Get dbType() As Integer
    dbType = mType
End Property



' Loop through the string and if there is a single
' quote, place another single quote next to it so that
' when it is in an sql update string and surrounded by
' single quotes things won't get screwed up.
Private Function fixupStringValue()
    
    If VarType(mValue) = vbString Then
        Dim i As Integer
        Dim valueLength As Integer
        valueLength = Len(mValue)
        
        ' replace all single quotes with two single quotes.
        i = InStr(1, mValue, "'")
        Do While i <> 0
            mValue = left$(mValue, i) & "'" & _
                right$(mValue, valueLength - i)
            valueLength = valueLength + 1
            i = InStr(i + 2, mValue, "'")
        Loop
    End If
End Function



⌨️ 快捷键说明

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