The IListSource does not contain any data sources. <-- ?

Ask a Question related to ASP.NET Data Grid Control, Design and Development.

  1. #1

    Default The IListSource does not contain any data sources. <-- ?

    Hi

    When I execute an SQL steatement, I retreive a
    Dataset. For some queries which does not
    return any data, If I assign it to the
    datagrid.datasource and bind, it throws the following
    exception
    >The IListSource does not contain any data sources.
    However, dataset doesn't say its NULL. So that Ican
    check for null and if its null, I don't bind it to grid.

    Jist, as to test, I did a
    >System.Diagnostics.Debug.WriteLine(results.GetXml ());
    and if there are no data it just outputs a "<NewDataSet />"
    which says no data. Everytime, when this happens if I
    assign to grid it throws the above exception.

    There should be a nice way to check this isn't it?

    How can I avoid this error?
    rgds
    KK


    KK Guest

  2. Similar Questions and Discussions

    1. How to add security to data sources from SQL 2000
      How to add security to data sources from SQL 2000 I have been doing ColdFusion programming for over 5 years and now I hired an assistant for...
    2. Data Sources
      Can anyone tell me how to get a list of Data Sources from CF server using cfml? Thanks: Phil
    3. backup data sources
      Is it possible to backup data sources from one server to another? I need to move data sources from Coldfusion MX to Coldfusion MX 7 server. Thanks...
    4. Restoring data sources in CF 5.0
      Hello guys, Could you please suggest a way to backup data sources for sybase, oracle and db2 from one UNIX server (Solaris) to another Solaris...
    5. how to access data from 2 different sources?
      I need to use data from multiple tables that are located in 2 different databases. Most of the tables are in SQL Server 2000 but 1 one the tables I...
  3. #2

    Default RE: The IListSource does not contain any data sources. <-- ?

    Hi,

    I think you can check for the tables count and if the tables
    (Dataset.Tables.Count) count is greater than 0, then you can bind it to the
    datagrid.

    Srimathi.

    "KK" wrote:
    > Hi
    >
    > When I execute an SQL steatement, I retreive a
    > Dataset. For some queries which does not
    > return any data, If I assign it to the
    > datagrid.datasource and bind, it throws the following
    > exception
    >
    > >The IListSource does not contain any data sources.
    >
    > However, dataset doesn't say its NULL. So that Ican
    > check for null and if its null, I don't bind it to grid.
    >
    > Jist, as to test, I did a
    >
    > >System.Diagnostics.Debug.WriteLine(results.GetXml ());
    > and if there are no data it just outputs a "<NewDataSet />"
    > which says no data. Everytime, when this happens if I
    > assign to grid it throws the above exception.
    >
    > There should be a nice way to check this isn't it?
    >
    > How can I avoid this error?
    > rgds
    > KK
    >
    >
    >
    Srimathi 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