点滴的积累,不断改进才是最好的编程过程。
网上摘录的一段代码,先存着
1
Sub OpenRecord()
2
Dim Record As New ADODB.Record
3
4
Call Record.Open("", "URL=http://localhost/", , adOpenIfExists Or adCreateCollection)
5
6
Dim Recordset As New ADODB.Recordset
7
Set Recordset = Record.GetChildren
8
9
While Not Recordset.EOF
10
Debug.Print Recordset(0)
11
Recordset.MoveNext
12
Wend
13
End Sub
14
15
Sub OpenStream()
16
17
Dim Record As New ADODB.Record
18
Call Record.Open("Text.txt", "URL=http://localhost/Access/", , adModeRead)
19
20
Dim Stream As New ADODB.Stream
21
Call Stream.Open(Record, adModeRead, adOpenStreamFromRecord)
22
23
Dim Text As String
24
Stream.Charset = "ascii"
25
Text = Stream.ReadText(adReadAll)
26
27
Debug.Print
28
29
End Sub
30

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
