data from oledbdatreader can't paged by datagrid

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default data from oledbdatreader can't paged by datagrid

    Hi,
    I am retrive record from an Access database and want them displayed page by
    page,
    I used oledbdatareader to retrive and assigned the datasource of datagrid
    control to this reader.
    but the data can't be paged when using AllowPaging=true, and it displayed
    a page using AllowCustomPaging=true,but still can't be paged.

    Is that if i want to page the records, I can't use oledbdatareader as
    datasource ?
    When I tried using oledataset, another problem appeared, the oledbcommand
    object don't has a filldataset method.

    Is that feasible that I page the records in DataGrid while I use the OLEDB
    namespace?

    Thanx.
    Yangtsi


    Yangtsi River Guest

  2. Similar Questions and Discussions

    1. Multiple paged recordsets
      Does anyone know how to place two or more INDEPENDENTLY PAGEABLE different sized recordsets on the same output page using DM8/ASP? I have created...
    2. No. of rows displayed in paged datagrid
      I have a DataGrid with AllowPaging="True" and AllowSorting="True". It works, but always displays 10 rows. How do I customize this? Many thanks.
    3. Paged queries
      Hi, im pretty new with CF and I was wondering how to make paged results in CF... anyone can point me to and example?? thanks a lot
    4. Having whitespace under minimal entries in a paged datagrid
      I have a datagrid with a header and pager. what i want to do is have a fixed height for the header and pager which i already now how to do. ...
    5. Explorer navigation errors with non-paged or large paged DataGrid.
      Hello everyone: This is my first posting here and I am new to aspnet so be patient. I am using a DataGrid with sorted columns to display some...
  3. #2

    Default Re: data from oledbdatreader can't paged by datagrid

    Hi,

    with custom paging you could do that but you are self responsibel for
    returning coorrect data for the DataGrid.

    If you use DataSet you would :

    1. Create a OleDbCommand object (assumes you already have connection OK)
    2. Create OleDbDataAdapter object that takes the command as parameter
    (SelectCommand proeprty or constructor)
    3. Create DataSet instance that you can fill with OleDbDataAdapter's Fill
    method.
    4. Bind the DataSet to the grid.

    I.e OleDbCommand really doesn't have FillDataSet method but OleDbDataAdapter
    is used instead.

    --
    Teemu Keiski
    MCP,Designer/Developer
    Mansoft tietotekniikka Oy
    [url]http://www.mansoft.fi[/url]

    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]

    Email:
    [email]joteke@aspalliance.com[/email]



    "Yangtsi River" <nakhi@sina.com> kirjoitti viestissä
    news:%23qmUz6cQDHA.3880@tk2msftngp13.phx.gbl...
    > Hi,
    > I am retrive record from an Access database and want them displayed page
    by
    > page,
    > I used oledbdatareader to retrive and assigned the datasource of datagrid
    > control to this reader.
    > but the data can't be paged when using AllowPaging=true, and it
    displayed
    > a page using AllowCustomPaging=true,but still can't be paged.
    >
    > Is that if i want to page the records, I can't use oledbdatareader as
    > datasource ?
    > When I tried using oledataset, another problem appeared, the oledbcommand
    > object don't has a filldataset method.
    >
    > Is that feasible that I page the records in DataGrid while I use the
    OLEDB
    > namespace?
    >
    > Thanx.
    > Yangtsi
    >
    >

    Teemu Keiski Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139