Results 1 to 2 of 2

Thread: Data Adapter ...

  1. #1

    Thread Starter
    Hyperactive Member spoiledkid's Avatar
    Join Date
    Oct 2002
    Location
    Canada
    Posts
    437

    Data Adapter ...

    Data Adapter's fill method does allow us to do paging where we can specify the number of records to fetch and stuff. However, it doesn't tell us how many records in total were affected by the Select Query ??? If we do not know total number of records we cannot get the PageCount/RecordCount .. any ideas ?

  2. #2
    Addicted Member
    Join Date
    May 2005
    Posts
    162

    Re: Data Adapter ...

    seems that we all use the same type of programs
    here is the code for displaying number of record and position
    VB Code:
    1. Private Sub displayrecordposition()
    2.         'display record position and number of records
    3.         Dim intRecordCount As Integer
    4.         Dim intRecordPosition As Integer
    5.  
    6.         intRecordCount = DsSQL1.Tables("dem").Rows.Count
    7.         If intRecordCount = 0 Then
    8.             lblRecordNumber.Text = "(No Records)"
    9.         Else
    10.             intRecordPosition = Me.BindingContext(DsSQL1, "dem").Position + 1
    11.             lblRecordNumber.Text = "Record " & intRecordPosition.ToString _
    12.             & " of " & intRecordCount.ToString
    13.         End If
    14.     End Sub
    dssql is my data set and dem is my table name

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width