|
|
 |
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0  | This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

November 1st, 2009, 09:12 PM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
INSERT Article fails also category fails too
Hi guys:
I open AddEditArticle.aspx for adding a new article. but when i click the insert,
the error came out. If insert category, the same problem.
Server Error in '/' Application.
Cannot insert the value NULL into column 'ArticleID', table 'aspnetdb.dbo.tbh_Articles'; column does not allow nulls. INSERT fails.
The statement has been terminated.
and SQL server profiler said that:
declare @p16 int
set @p16=NULL
exec tbh_Articles_InsertArticle @AddedDate=''2009-11-02
09:15:27:140'',@AddedBy=N'wxt',@CategoryID=1,@Titl e=N'jl;',@Abstract=N'jl;',@Body=N'<p> jkl;</p>',@Country=N'Albania',@State=N'jkll;',@City=N'kl jl',@ReleaseDate=''2009-11-02
09:15:27:140'',@ExpireDate=''9999-12-31 23:59:59:997'',@Approved=0,@Listed=1,@CommentsEnab led=1,@OnlyForMembers=0,@ArticleID=@p16 output
select @p16
i am confused the BLL and DAL insert function and store procedure are right, I just copy them from the code download here( insert without error). any help would be appreciate.
Last edited by f117f117f117677 : November 1st, 2009 at 09:14 PM.
Reason: add some comments
|

November 3rd, 2009, 04:31 PM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
|
|
What do you have for Insert parameters in the objCurrentArticle ObjectDataSource?
Also, are you absolutely sure you have ArticleID set up in the database as an auto-incrementing Identity field?
|

November 4th, 2009, 07:20 AM
|
|
Registered User
|
|
Join Date: Nov 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Bingo
Quote:
Originally Posted by Lee Dumond
What do you have for Insert parameters in the objCurrentArticle ObjectDataSource?
Also, are you absolutely sure you have ArticleID set up in the database as an auto-incrementing Identity field?
|
Lee Dumond 
you are so brightness, my problem is i don't have ID set up as an auto-incrementing Identity field. I just correct it and running right, thanks a lot.
|

November 4th, 2009, 09:20 AM
|
 |
Wrox Author
|
|
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 807
Thanks: 12
Thanked 140 Times in 140 Posts
|
|
Quote:
Originally Posted by f117f117f117677
Lee Dumond 
you are so brightness,
|
Yes, yes I am. Thanks for noticing. 
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |