# Re: 要如何比对阿!!!

Posted by Honey on July 28, 1999 at 21:27:30:

In Reply to: Re: 要如何比对阿!!! posted by 小琳 on July 28, 1999 at 21:04:31:

从来没碰过资料库
我想为了效能 资料库应该是用随机档吧
应该没错吧
若栏位量并没有很大 可以用你的这种方式 ~用自订型态
但这个资料大小量不能大于64k

Option Explicit
Private Type Score
TR(1 To 5) As String * 2'/*共10个位元组*/
End Type
Dim rec As Score, I As Byte, J As Byte, s As Long

Private Sub Command1_Click()
Open "c:\WW.TXT" For Random As #1 Len = 10'/*每笔资料10个位元组*/
For I = 1 To 100'/*到100笔资料*/
Get #1, I, rec
For J = 1 To 5'/*共5个栏位*/
If rec.TR(J) = "AA" Then s = s + 1
Next
Next
Close #1

Me.Caption = s
End Sub

Follow Ups: