Last post Feb 08, 2010 08:40 PM by sabalimotu
Nov 16, 2009 07:54 AM|evvo|LINK
I have switched the provider from the aspnetprovider to windows as this will run within a local area network and staff will access it via their existing network logins.
However after changing this via the site configuration wizard I can no longer post ads.
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Ads_Members". The conflict occurred in database "Classifieds", table "dbo.Members", column 'Id'.
Presumably there is no member id allocated now as registration is no longer required but how do I cater for this in the code?
Nov 17, 2009 09:13 PM|darkknight187|LINK
A quick and dirty way would be to set a default memberid if none is present, to "0"
The complete way, I'm guessing is to go through site, stored Procedures and all,
and remove all references to MemberId.
Don't forget to check the database triggers.
It might have references in there too.
And of course make a complete backup before you start, just in case.
Nov 18, 2009 06:05 AM|evvo|LINK
ok but how will ads then be associated with staff members who post them?
i cant default the db value to 0 without removing its primary key status and removing all relationships...
or did you mean assigning it in the code?
i tried latter but still getting the same error.
Nov 19, 2009 10:18 AM|darkknight187|LINK
In that case I don't have any suggestions, other than just use Forms instead of windows, and of course they would just need to register/login seperately.
You might want to try posting in one of the more advanced forums.
Might get some ideas that way.
Nov 20, 2009 03:32 AM|evvo|LINK
ok thanks, i think i will have an easier job starting from scratch rather than trying to change this app to work with network logins.
it has at least given me ideas for what features i want.
Jan 01, 2010 10:30 AM|sabalimotu|LINK
I have a similar problem , my website is almost complete and i thought the most easiest aspect will be just to do some minor adjust at that section refer to as POST ADVERT. and it turn to most difficult area, i got the similar error as above and my is as
The author of classifield site must hear about this however we shall join hand together to solve the problem , the problem proof stuborn since it occur direct from database of the downloaded classifields site, all attempt to start the new site from scratch
prove abortive that is given thesame error even redownloading the classifields site did not help the situation but i think if all fail, let us start like this.
re install the visual web developer and re download the classifields site and start the manipulation of the site from that page that is POST Ads. and let see if the error will occur again.
see u at the top.
Jan 16, 2010 08:12 AM|sabalimotu|LINK
Rebuild the site and then deburg.or right click the name of the site and choose add reference, select appropriate option like asp.net either 2.0 or 3.0. then rebuild and deburg.i am sure the site will run and u will be able to post ad and do a lot of thing
within the site. good luck.
SOLUTION TO FAILURE TO POST AD. IN CLASSIFIED SITE DUE TO ERROR
Feb 08, 2010 08:40 PM|sabalimotu|LINK
There are various points which may cause this issues but let us briefly look at how my own issue was resolved.
1. what i did was that i rebuild the site
2. then , i deburg or run.
also if u notice any of the page that is given the error delete the page and copy a fresh one from the classifield site to your main. for example, if the login page is given the error , delete, copy a new one from a classifield template using a copy tool
then rebuild the site
then, deburg or run