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

📄 modcommon.vb

📁 Visual Basic Oracle数据库联接
💻 VB
字号:
'Throw back from vb6 BAS module

Module CommonBAS
    'Location of XML Files
    Public m_AppPath As String = Application.StartupPath

    'Connection paths / File locations
    Public m_ParentPath As String
    Public m_connProducts As String = "\Data\Products.xml"
    Public m_connCustomers As String = "\Data\Customers.xml"

    'String used to setup customized IDs
    Private Const abc As String = "02346789ABDEFGHKLMNOPQRSTVWXY"

    Public Function GenerateID(Optional ByVal sPrefix As String = "DAT", Optional ByVal vDataSeed As String = "4") As String
        Dim vDataGUID As String
        Dim r, i As Single
        For i = 0 To 4
            Randomize()
            r = Int((Rnd() * 45) + 1)
            vDataGUID = vDataSeed & Mid(abc, CType(r, Integer), 1)
            vDataSeed = vDataGUID & Int((Rnd() * 23) + 6)
        Next i
        If Not sPrefix = vbNullString Then vDataSeed = Microsoft.VisualBasic.Left(UCase(sPrefix), 3) & vDataSeed
        GenerateID = vDataSeed
    End Function

End Module

⌨️ 快捷键说明

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