p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   Stored Procedure isn't working (http://p2p.wrox.com/showthread.php?t=51286)

yougotiger December 7th, 2006 06:46 PM

Stored Procedure isn't working
I am having some difficulty with chapter 5. I have created all the pages and the database, but I cannot get my update and delete stored procedures to work correctly. I created the SQL database in a stand alone database on another machine. I can insert article without any problem, but if I change one, it appears to work, but nothing actually gets changed. If I go into the SQL management suite and execute the stored procedure, it will update the data. I can't see the difference between my code and that which I downloaded from the site here (the VB version). All the correct data gets passed to the SQLArticlesProvider and to the command object, but when it executes, it returns 0 and the data doesn't get updated.

Also, I cannot delete an article. If I click the trash can icon, I get the confirmation and it processes, but near as I can tell, it is passing 0 as the article ID rather than the actual ID. If I step through the code, The SqlArticlesProvider ends up with ID as 0.

I have been looking through this for like 6 hours over a 3-5 day period, and haven't been able to figure it out. Any help would be GREATLY appreciated.


Brian W.

yougotiger January 5th, 2007 06:53 PM

Ok, found the error why it wouldn't update. I found that I was misnaming some of my stuff. The update categories didn't work becuase I had a different parameter name and column name (for more info http://www.c-sharpcorner.com/UploadF...0-b59a95602498). Reconciled them and VIOLA. Articles was a little different, left out 'DataKeyNames="ID"' in my details view put it in an it works, still working on the deletion problem.

All times are GMT -4. The time now is 06:49 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.