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

📄 local.frm

📁 一个不错的数据库连接程序
💻 FRM
📖 第 1 页 / 共 4 页
字号:
         TabIndex        =   4
         Top             =   220
         Width           =   975
      End
      Begin VB.CheckBox Check1 
         Caption         =   "自动刷新"
         ForeColor       =   &H00800000&
         Height          =   255
         Left            =   120
         TabIndex        =   3
         Top             =   240
         Width           =   1575
      End
      Begin VB.Timer Timer1 
         Enabled         =   0   'False
         Interval        =   2000
         Left            =   840
         Top             =   1320
      End
      Begin MSComctlLib.ListView lstfields 
         Height          =   5175
         Left            =   120
         TabIndex        =   1
         Top             =   1200
         Width           =   9795
         _ExtentX        =   17277
         _ExtentY        =   9128
         View            =   3
         Arrange         =   1
         LabelEdit       =   1
         Sorted          =   -1  'True
         MultiSelect     =   -1  'True
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         AllowReorder    =   -1  'True
         FullRowSelect   =   -1  'True
         GridLines       =   -1  'True
         PictureAlignment=   4
         _Version        =   393217
         ColHdrIcons     =   "ImageList2"
         ForeColor       =   -2147483640
         BackColor       =   16777215
         BorderStyle     =   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   0
      End
      Begin VB.TextBox txterrors 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "MS Sans Serif"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   2055
         Left            =   -74880
         Locked          =   -1  'True
         MultiLine       =   -1  'True
         TabIndex        =   9
         Top             =   4320
         Width           =   9790
      End
      Begin MSComctlLib.ListView lstresult 
         Height          =   2055
         Left            =   -74880
         TabIndex        =   7
         Top             =   4320
         Width           =   9795
         _ExtentX        =   17277
         _ExtentY        =   3625
         View            =   3
         Arrange         =   1
         LabelEdit       =   1
         Sorted          =   -1  'True
         LabelWrap       =   -1  'True
         HideSelection   =   0   'False
         AllowReorder    =   -1  'True
         FullRowSelect   =   -1  'True
         PictureAlignment=   4
         _Version        =   393217
         ColHdrIcons     =   "ImageList2"
         ForeColor       =   -2147483640
         BackColor       =   16777215
         BorderStyle     =   1
         Appearance      =   0
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         NumItems        =   0
      End
      Begin VB.Image ctrl 
         Height          =   240
         Left            =   6600
         Picture         =   "local.frx":4CCC
         Stretch         =   -1  'True
         Top             =   930
         Width           =   315
      End
      Begin VB.Image Image3 
         Height          =   240
         Left            =   3675
         Picture         =   "local.frx":5056
         Top             =   930
         Width           =   240
      End
      Begin VB.Image Image2 
         Height          =   240
         Left            =   120
         Picture         =   "local.frx":53E0
         Top             =   930
         Width           =   240
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "输入信息按回车"
         ForeColor       =   &H000000C0&
         Height          =   180
         Left            =   3960
         TabIndex        =   20
         Top             =   960
         Width           =   1260
      End
      Begin MSForms.ComboBox cbotables 
         Height          =   375
         Left            =   2520
         TabIndex        =   0
         ToolTipText     =   "选择表"
         Top             =   405
         Width           =   4335
         VariousPropertyBits=   746604571
         BackColor       =   16777215
         ForeColor       =   8388608
         DisplayStyle    =   3
         Size            =   "7646;661"
         MatchEntry      =   1
         ListStyle       =   1
         ShowDropButtonWhen=   2
         DropButtonStyle =   2
         BorderColor     =   16512
         SpecialEffect   =   6
         FontHeight      =   195
         FontCharSet     =   0
         FontPitchAndFamily=   2
      End
      Begin VB.Label lblctrlkeys 
         AutoSize        =   -1  'True
         Caption         =   "按住 CTRL 键可以多记录选择"
         ForeColor       =   &H000000C0&
         Height          =   180
         Left            =   6960
         TabIndex        =   19
         Top             =   960
         Width           =   2340
      End
      Begin VB.Label lblcolumnheads 
         AutoSize        =   -1  'True
         Caption         =   "列头上单击进行排序"
         ForeColor       =   &H000000C0&
         Height          =   180
         Left            =   480
         TabIndex        =   17
         Top             =   960
         Width           =   1620
      End
      Begin MSForms.CommandButton cmddescriptions 
         Height          =   630
         Left            =   8160
         TabIndex        =   16
         Top             =   240
         Width           =   1695
         BackColor       =   14737632
         VariousPropertyBits=   25
         Caption         =   "字段信息"
         Size            =   "2990;1111"
         Picture         =   "local.frx":576A
         FontName        =   "宋体"
         FontEffects     =   1073750016
         FontHeight      =   180
         FontCharSet     =   134
         FontPitchAndFamily=   2
         ParagraphAlign  =   3
      End
      Begin VB.Image Image1 
         Height          =   480
         Left            =   1920
         Picture         =   "local.frx":58C4
         Top             =   345
         Width           =   480
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "( Select specific query in the multiple queries by selecting it )"
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000080&
         Height          =   210
         Left            =   -69480
         TabIndex        =   12
         Top             =   4080
         Width           =   4365
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "结果"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000080&
         Height          =   180
         Left            =   -74880
         TabIndex        =   8
         Top             =   4080
         Width           =   390
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "Type your query and press Run or F5 button."
         BeginProperty Font 
            Name            =   "Arial"
            Size            =   8.25
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000080&
         Height          =   210
         Left            =   -73320
         TabIndex        =   6
         Top             =   4080
         Width           =   3270
      End
      Begin VB.Label lbltables 
         Alignment       =   2  'Center
         Caption         =   "选择表"
         ForeColor       =   &H00000080&
         Height          =   240
         Left            =   2490
         TabIndex        =   5
         Top             =   180
         Width           =   4245
      End
   End
   Begin VB.Menu mnuconnect 
      Caption         =   "连接"
      Begin VB.Menu mnuaccess 
         Caption         =   "MS Access "
      End
      Begin VB.Menu mnuSqlserver 
         Caption         =   "SQL Server"
      End
      Begin VB.Menu mnusep 
         Caption         =   "-"
      End
      Begin VB.Menu mnuodbc 
         Caption         =   "ODBC (DSN)"
         Begin VB.Menu mnuaccessdsn 
            Caption         =   "MS Access"
         End
         Begin VB.Menu mnuSqlserverdsn 
            Caption         =   "SQL Server"
         End
         Begin VB.Menu mnumysql 
            Caption         =   "MySQL"
         End
      End
      Begin VB.Menu mnusep2 
         Caption         =   "-"
         Visible         =   0   'False
      End
      Begin VB.Menu mnuruntime 
         Caption         =   ""
         Visible         =   0   'False
      End
   End
   Begin VB.Menu mnuabout 
      Caption         =   "关于"
   End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'----------------------------------------------------------
' Design & Developed By   :   Deepak Sharma
'
' E-Mail                  :   deepakmailto@rediffmail.com
'
'
' For Any Queries And Suggestions Please Write To Me At My
' E-Mail Address.
'
' If You Like This Code Then Please Vote Me And Post Yours
' Messages So That I Can Judge My Programming Skills.
'
'                                                Thanks
'                                           (Deepak Sharma)
'----------------------------------------------------------

Dim RunQuery            As New ADODB.Recordset

Dim X                   As ListItem

Dim num                 As Integer
Dim i                   As Integer
Dim j                   As Integer

Dim SQL                 As String
Public Temp             As String
Dim FieldTypes          As String
Dim TempTable           As String
Dim Tablename           As String
Dim Filename            As String
Dim TempStore           As String
Dim Current_Table       As String

Dim tablefound          As Boolean
Dim Fills               As Boolean
Dim SQLQUERY            As Boolean

Private Type FieldList
 
  Field_Name            As String
  Field_Type            As String
  Field_Length          As String

End Type

Dim StoreValues()       As FieldList

Public Sub FillGrid()
On Error GoTo Jump

   If Me.cbotables.Text <> "" Then
       
       Erase StoreValues
       Me.cmddescriptions.Enabled = True
       Screen.MousePointer = vbHourglass
       StatusBar1.Panels(1).Picture = ImageList1.ListImages(3).Picture
       StatusBar1.Panels(1).Text = "正在搜索记录,稍候..."
       StatusBar1.Panels(2).Text = "总计记录 : 0"
       StatusBar1.Panels(3).Text = "总计字段 : 0"
   
       Me.lstfields.ListItems.Clear
       Me.lstfields.ColumnHeaders.Clear
       
       Tablename = ""
       FieldTypes = ""
       Current_Table = Me.cbotables.Text
   
        If Fill.State = 1 Then Fill.Close
        If Field.State = 1 Then Field.Close
        
        If DatabaseType = MYSQl Then
        
          Tablename = "select * from " & Trim(Me.cbotables.Text)
        
        Else
        
          Tablename = "select * from [" & (Me.cbotables.Text) & "]"
        

⌨️ 快捷键说明

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