RSS Forums RSS
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

IListSource does not contain any data sources

Join Date: Feb 2003
Location: Canada
Posts: 786
Reputation: Paladine has a spectacular aura about Paladine has a spectacular aura about Paladine has a spectacular aura about 
Rep Power: 9
Solved Threads: 25
Colleague
Paladine's Avatar
Paladine Paladine is offline Offline
Master Poster

Re: IListSource does not contain any data sources

  #5  
Jul 27th, 2005
Well I am no tired thanks for the suggestion though.

My point was the logic you say you know about is not being conveyed with your question. I was not trying to offend you! But I was trying to make the point that you should ... if pen and paper help to do this...then use it ... right down the flow, and what is happening versus what you want to happen.

For your particular error, the error occurs because it is looking for the Dataset (from the else statement) but you have it commented out. Saying that, the dataset you have commented out is not the one you want.....at the moment..... what it should be is the dataset retrieved following the selections/refinement made just prior to the search button being made. So..... populate the Session variable in the Search_Click event with the "updated" dataset and uncomment out the line in the else statement.... voila?

So see to me that is a logic issue. Not a code issue. See my point? And I agree with this "although sometimes I am still forced to sift through other people's code in books and such, learning what I can" statement, but what you should do is always understand the flow of the logic...the code can be gibberish, as long as the logic is sound you can diagnose the problem.

This error:
Exception Details: System.Web.HttpException: The IListSource does not contain any data sources.

Source Error:


Line 77: softwareGrid.DataMember = "[SOFTWARE DATABASE]"
Line 78: softwareGrid.DataKeyField = "Software #"
Line 79: softwareGrid.DataBind()
Line 80: End Sub
Line 81:

is an exception because there is no dataset with that datamember (line 77) available.

So I hope this helps you out...
Assistant Manager, Regional Pharmacy Information Systems
TLC Services Website (Under Construction)
Updated : ASP.Net Login Code
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:29 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC