how about using the standard "allow paging" properties in VS.NET it makes the paging very simple...
blueei
Posts
-
Database pagination -
Retrieval of data from mulit table from SQL server and load into datagrid:(( hilo, i'm a newbie at VB.NET... and i've wrote in VB.NET i've been trying examples from reference books and online reference... but it seems that i either got the syntax wrong or just could not get it right, i think that i have something somewhere wrong with the Join table part. as i have to use 3 different tables to get the result. anyone, pls help out... thank you! veri veri much! :-O my syntax are as follows... ''''''''''''''''''''''''''''''''''''''''''''''''''' Dim objDataSet As New DataSet("ValidReasonList") Dim cnn As SqlConnection Dim cmd As SqlDataAdapter Dim sql As String Dim tblValidReasons As New DataTable("ValidReasons") cnn = New SqlConnection("server=(local); database=sas2000; Integrated Security=SSPI") sql = "SELECT A.APPROVED, B.ADMNO, B.DATEFROM, B.DATETO, B.REASON_DESC, C.REASONTYPE_NAME" sql = sql & "FROM ABSENCE A, ABS_REASON B, ABS_REASON_TYPE C" sql = sql & "WHERE A.REASON_ID = B.REASON_ID AND B.REASONTYPE_ID = C.REASONTYPE_ID" sql = sql & "ORDER BY B.ADMNO" cmd = New SqlDataAdapter(sql, cnn) cmd.Fill(objDataSet, "JoinTable") dgValidReasons.DataSource = objDataSet.Tables("JoinTable").DefaultView dgValidReasons.DataBind() '''''''''''''''''''''''''''''''''''''''''''''''''''''':rose: