module1.bas

来自「县级电力调度管理信息系统。VB6.0开发。 DMIS调度子系统包括以下功能模块」· BAS 代码 · 共 51 行

BAS
51
字号
Attribute VB_Name = "Module1"
Global Const ZHCX_DSN = "DSN=ddmis;UID=sa;PWD=mis005;Database=zhcx"
'Global Hiscon As New ADODB.Connection
Global ZHCX As New ADODB.Connection
Global RS As New ADODB.Recordset
Global RS1 As New ADODB.Recordset
Global RS2 As New ADODB.Recordset
Global RS3 As New ADODB.Recordset
Global RS4 As New ADODB.Recordset
Public ID As Integer
Public A As Integer
Public cname As String
Public yhlx As String
Public ZBBC As String
Public GLID As Integer
Public zbjlxh As Integer
Public qhhm As Integer

Sub Main()
frmdl.Show

End Sub
Public Sub Open_link()
On Error Resume Next

    ZHCX.CursorLocation = adUseClient
    ZHCX.CommandTimeout = 5 * ZHCX.CommandTimeout
     ZHCX.ConnectionTimeout = 5 * ZHCX.ConnectionTimeout
    ZHCX.Mode = adModeReadWrite
    For i = 0 To 30
        Err.Clear
        ZHCX.Open ZHCX_DSN
        If Err.Number = 0 Then Exit For
        For j = 0 To 300
        DoEvents
        Next j
    
    Next i

'ZHCX.CursorLocation = adUseClient
'ZHCX.Open ZHCX_DSN
End Sub
Public Sub Close_link()
On Error Resume Next
'Hiscon.Close
If ZHCX.State Then
    ZHCX.Close
End If
End Sub

⌨️ 快捷键说明

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