Hello All,
can anybody tell me what is wrong with this code for c#?
tmp.Mobile2 = reader.IsDBNull(19)? reader.GetString(19) : "";
I'm reading datas from accessDB, want to write -> if value = null (no entered data) then return ""
Or any other solution?
Access + c#
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted May 15, 2014, 7:16 AM EDT
It should be:
tmp.Mobile2 = reader.IsDBNull(19) ? "" : reader.GetString(19);
Akhil MittalRank #133 · 16.9K reputationPosted May 15, 2014, 7:41 PM EDT