We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,078 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

costs won't appear in gridview anymore

So I have a table that stores various prices for things. The ID is set as the primary key and doesnt allow nulls. I then have a stored procedure that takes the data entered into the form (ID) included and it works out the cost of that particular item. This is then presented in a gridview. However it isn't working, was working before and it's just stopped. Before, in the database the ID did allow nulls, however someone has told me this could be the problem along with this line of code

obj.CostID = (Int32)reader["CostID"];

This is used to fill the object with the data.

Any ideas how I can fix this? I've already changed the field in the database to not allow nulls.

3
Contributors
2
Replies
4 Hours
Discussion Span
4 Months Ago
Last Updated
3
Views
coder91
Junior Poster in Training
93 posts since Oct 2012
Reputation Points: 0
Solved Threads: 0
Skill Endorsements: 0

what you are saying is that the cost details are not displaying in Form? or do you want check the nulls , before inserting the data into DB?

BhuvanRam
Light Poster
43 posts since Jul 2010
Reputation Points: 10
Solved Threads: 6
Skill Endorsements: 0

Is asp.net generating an error?

JorgeM
Industrious Poster
4,017 posts since Dec 2011
Reputation Points: 294
Solved Threads: 546
Skill Endorsements: 115

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0581 seconds using 2.65MB