如何得到符合条件的所有纪录
想要实现符合条件的多条记录,并把多条记录的某个字段的值读出来,现在是不能循环读,只读一条,请问如何修改?谢谢
Adodc2.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source= " + App.Path + "\pic.mdb;Persist Security Info=True "
Adodc2.RecordSource = "T1 "
Adodc2.Refresh
Adodc2.Recordset.MoveFirst
Adodc2.Recordset.Find (str)
If Not Adodc2.Recordset.EOF Then ‘我觉得是这个语法不对,是不是用do while 请执教
result2 = BitBlt(Picture1.hDC, 4, 0, Picture1.Width / Screen.TwipsPerPixelX, Picture1.Height / Screen.TwipsPerPixelY, Picture1.hDC, 0, 0, SRCCOPY)
TLine_ALL 1, Adodc2.Recordset.Fields(2), Adodc2.Recordset.Fields(3)
End If
Adodc2.Recordset.MoveNext
[解决办法]
for i=0 to Adodc2.Recordset.recordcount-1
...
Adodc2.Recordset.MoveNext
next
[解决办法]
i=0
while i <Adodc2.Recordset.recordcount
...
i=i+1
Adodc2.Recordset.MoveNext
wend
[解决办法]
do while Not Adodc2.Recordset.EOF
result2 = BitBlt(Picture1.hDC, 4, 0, Picture1.Width / Screen.TwipsPerPixelX, Picture1.Height / Screen.TwipsPerPixelY, Picture1.hDC, 0, 0, SRCCOPY)
TLine_ALL 1, Adodc2.Recordset.Fields(2), Adodc2.Recordset.Fields(3)
Adodc2.Recordset.MoveNext
loop