Can someone explain to me why I can convert.tostring and Ctype the ExecuteScalar result if a command object with no issues, but if I use the Trycast operator the value returned is always nothing?
Say my sql text returns the string value "Tek-Tips"
Convert.tostring(cmd.ExecuteScalar) returns "Tek-Tips"
ctype(cmd.ExecuteScalar,string) returns "Tek-Tips"
trycast(cmd.ExecuteScalar,string) returns nothing
Say my sql text returns the string value "Tek-Tips"
Convert.tostring(cmd.ExecuteScalar) returns "Tek-Tips"
ctype(cmd.ExecuteScalar,string) returns "Tek-Tips"
trycast(cmd.ExecuteScalar,string) returns nothing