📄 module1.bas
字号:
Attribute VB_Name = "Module1"
Global Guid As String
Global Gpwd As String
Global Gdblink As String
Global ssn As Integer
Global strssn As String
Global conn As ADODB.connection
Public Function connection() As Boolean
Guid = "atest"
Gpwd = "atest"
Gdblink = "BOX"
strconnect = "DATA SOURCE=" & Gdblink & ";"
Set conn = New ADODB.connection
conn.Provider = "MSDAORA"
With conn
.ConnectionTimeout = 10
.CursorLocation = adUseClient
.Open strconnect, Guid, Gpwd
End With
End Function
Function check(data1 As Variant, data2 As Variant) As Variant
If IsNull(data1) Then
check = data2
Else
check = data1
End If
End Function
'Function prin(ByVal row As Integer, ByVal cols As Integer)
'Dim text As String
'Dim spa As String * 5
'For b = 0 To cols - 1
'
' text = text & Form1.MSFlexGrid1.TextMatrix(row, b) & spa
'
' Next
'
'prin = text
'
'End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -