ramida โพสต์ 2018-11-1 16:11:03

VB6 แสดงจำนวน จำนวน ของข้อมูล

วิธีให้ Label1.captionวิ่งจำนวน record เวลา select ข้อมูล   #   จำนวนบวกไปจนครบจำนวนทั้งหมด /จำนวนทั้งหมด      

thongkorn โพสต์ 2018-11-1 20:36:27

มันจะแสดงผลเร็วมากน่ะครับ
    Dim RS As New ADODB.Recordset
    Set RS = New Recordset
    RS.CursorLocation = adUseClient
    Dim Statement As String
    Statement = "SELECT tbl_IC_Product.* " & _
                            " From tbl_IC_Product " & _
                            " ORDER BY ProductPK "
    RS.Open Statement, ConnDB, adOpenForwardOnly, adLockReadOnly, adCmdText
    Dim i As Long
    For i = 1 To RS.RecordCount
      Label1.Caption = "ข้อมูลที่ : " & i & "/" & RS.RecordCount
      RS.MoveNext
    Next
    RS.Close:   Set RS = Nothing



หน้า: [1]
ดูในรูปแบบกติ: VB6 แสดงจำนวน จำนวน ของข้อมูล