Last post Oct 31, 2005 12:29 PM by raroldan
Sep 22, 2005 07:38 AM|aspwhiz|LINK
Sep 28, 2005 12:18 PM|brentman|LINK
I am able to use the column name as follows:
if not IsDBNULL(dtritem("CompletedBy")) then
txtCompletedBy.text = dtritem("CompletedBy")
where dtritem is a datareader.
This has worked for me using MS Access, MS SQL 2000, and MySQL.
Is vb.net the difference?
Oct 04, 2005 04:36 PM|aspwhiz|LINK
Oct 04, 2005 04:38 PM|aspwhiz|LINK
Oct 17, 2005 04:29 PM|joe0928|LINK
Oct 31, 2005 12:29 PM|raroldan|LINK
If find this easier to use:
long, but hey it works. The IIF funtion evaluates a condition, isdbnull(dtritem("field")), and has two possible values, the second parameter is the
True value, here if it's a string to be returned you can return
string.empty or "" or what ever else you feel like returning, if it's a number you can return
0, the third parameter is the False value, where I return the value of the field
dtritem("field"). Good practise and maybe some think overkill is to cast the whole thing to the expected type.
Example for a string:
txtAddress.Text = convert.tostring(iif(isdbnull(dtritem("field")), string.empty, drtitem("field")))