Solved

Property cannot be set to null

Posted on 2013-05-16
1
384 Views
Last Modified: 2013-06-07
I have a field in an SQL db that is an int allow null. I have a property in the class for the SQL View that the data is matched to. In the class the property for the field has the default get and set. When I run the project I get the following error...

The 'SortOrder' property on 'TagSummaryView' could not be set to a 'null' value. You must set this property to a non-null value of type 'Int32'.
0
Comment
Question by:rawilken
1 Comment
 
LVL 22

Accepted Solution

by:
Ivo Stoykov earned 500 total points
ID: 39173961
you could set your property as a nullable, i.e.
int? i = null;

Open in new window

Look here for more info.

HTH

Ivo Stoykov
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now