📄 nqzx1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
AutoRedraw = -1 'True
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 495
Left = 1920
TabIndex = 0
Top = 1440
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Open "c:\trs\sun_time.txt" For Append As #1
'定义变量
Dim adoconnection As New ADODB.Connection
Dim adors1 As New ADODB.Recordset
Dim adors2 As New ADODB.Recordset
'打开记录对象1和2
adors2.ActiveConnection = "provider=sqloledb.1;data source=172.24.8.100;initial catalog=nqqb;uid=sa;pwd=user01;"
adors2.CursorType = adOpenKeyset
adors2.LockType = adLockOptimistic
adors2.Source = "Select * From sun_time"
adors2.Open
adors2.MoveFirst
Do Until adors2.EOF
For i = 0 To 37
If adors2.Fields(i) = "null" Then adors2.Fields(i) = " -9999"
Print #1, adors2.Fields(i);
Next i
Print #1,
adors2.MoveNext
Loop
Close #1
adors2.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -