1.11M Members

costs won't appear in gridview anymore

 
0
 

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.

 
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?

 
0
 

Is asp.net generating an error?

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article