Last post Feb 07, 2010 06:20 PM by redwoodbev
Feb 05, 2010 09:06 PM|redwoodbev|LINK
I've added five fields to the database modeling them all on the adtype field. They are dates (year, startmonth, startdate, endmonth, enddate) all integer types like adtype. I just couldn't make sense of using datetime.
I've worked throught the server errors and all pages display, I've got test ads in the database and double checked there are no NULLs. The featured ads show, ShowAd works for individual ads and MyAds returns the correct data, but Search returns no ads no
matter what search criteria is entered and AdvancedSearch is the same.
I presume the problem is in Search.aspx, Search.aspx.vb, AdvancedSearch.aspx, AdvancedSearch.aspx.vb or maybe AdvancedSearch.ascx or ascx.vb. Somewhere in the logic I must be excluding all ads. However, since I'm basically just trying to copy how adtype
is used and don't really understand the code, I can't seem to figure this out. I wonder if someone with experience would point me toward the right direction. Maybe someone has experienced this problem after modifying the database and already sorted it out.
Feb 07, 2010 01:10 AM|darkknight187|LINK
I think your issue is in one of two areas.
Most likely it's your storedprocedure getalladsbyquery.
Or it's in App_Code/DAL/Ads.xsd
Feb 07, 2010 06:20 PM|redwoodbev|LINK
Hi, Thanks for the response. Yes, I had added a piece of code (trying to copy an existing field) which didn't belong in GetAdsByQuery in Ads.vb. Once I commented out the bad code, search function returned to normal. My problem is not really understanding
all the code and sort of blindly copying. However, I have learned a bunch and I'm sure the next change will be easier.