The intention was, if the record exists, get the values in the record. If not, default to certain values. This used to be achieved by one SQL statement, and no other .net code needed. I reduced number of fields to just A and B, in reality there are 10 of them. If I had to default the values in .net code prior to executing the SQL statement, it will take more lines to code than this. It is doable of course, just wondering if there is an equivalent, hence the question.
↧