-
Notifications
You must be signed in to change notification settings - Fork 0
/
frmTemp.frm
72 lines (68 loc) · 1.79 KB
/
frmTemp.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
VERSION 5.00
Begin VB.Form frmTemp
Caption = "Form1"
ClientHeight = 5580
ClientLeft = 60
ClientTop = 345
ClientWidth = 9480
LinkTopic = "Form1"
ScaleHeight = 5580
ScaleWidth = 9480
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 255
Left = 3360
TabIndex = 1
Top = 5280
Width = 1335
End
Begin VB.TextBox Text1
Height = 4935
Left = 360
MultiLine = -1 'True
TabIndex = 0
Text = "frmTemp.frx":0000
Top = 240
Width = 8775
End
End
Attribute VB_Name = "frmTemp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
Me.Text1.Text = edwinEncryption(Me.Text1.Text)
End Sub
Private Sub Form_Load()
Dim strSQL As String
Dim tmpString As String
Dim i As Integer
strSQL = "select tHeight from Tide_WAG order by tdate"
rst.Open strSQL, conn, adOpenKeyset
Dim fs As New FileSystemObject
Dim f As TextStream
Set f = fs.CreateTextFile("wag.txt", True)
i = 0
tmpString = ""
Do While Not rst.EOF
tmpString = tmpString & rst.Fields(0)
i = i + 1
If i = 24 Then
f.WriteLine edwinEncryption(tmpString)
'f.WriteLine tmpString
tmpString = ""
i = 0
Else
tmpString = tmpString & ","
End If
rst.MoveNext
Loop
f.WriteLine edwinEncryption(Left(tmpString, Len(tmpString) - 1))
'f.WriteLine Left(tmpString, Len(tmpString) - 1)
f.Close
Set fs = Nothing
rst.Close
End Sub