我想取得最後一筆資料的 Record Number, 找遍了MSDN 上的有關 BOTTOM 的資訊,但是没找到,現在只好用土法鍊鋼的方法如下所示:
Dim tmp As String
Dim inx As Integer
Dim inf_sr As StreamReader = New StreamReader(inf)
Do While inf_sr.Peek() >= 0
inx += 1
tmp = inf_sr.ReadLine()
Loop
inf_sr.Close()
Dim TextStr As New System.IO.StreamReader(FileTxt, System.Text.Encoding.Default)
Dim Ia As Long = 0
Do While TextStr.Peek > -1
Dim Data As String = TextStr.ReadLine
Ia +=1
SELECT CASE IA
CASE 1
Dim 日期 As String = Mid(Data, 1, 8)
Dim 時間 As String = Mid(Data, 9, 6)
CASE ELSE
Dim 日期 As String = Mid(Data, 1, 8)
Dim 時間 As String = Mid(Data, 9, 6)
END SELECT
Loop
SELECT CASE IA
CASE XoX
Dim 日期 As String = Mid(Data, 1, 8)
Dim 時間 As String = Mid(Data, 9, 6)
CASE ELSE
Dim 日期 As String = Mid(Data, 1, 8)
Dim 時間 As String = Mid(Data, 9, 6)
END SELECT作者: linshin1999 時間: 2011-1-6 09:10