Hi i'm trying to split a return db value. I've tried reworking the code but nothing seems to work. Maybe a more refreshed brain can assist? Below is an example of what i've tried, the returned value format: bit|char (eg. "0|John Smith"
i need to determine if the bit value returned is zero or one. Thoughts? Thanks.
error: cannot convert type string to bool
i need to determine if the bit value returned is zero or one. Thoughts? Thanks.
error: cannot convert type string to bool
Code:
...
object isAlready = cmd.ExecuteScalar();
con.Close();
string[] arrVals = isAlready.ToString().Split(new Char[] { '|' }, 2);
if (arrVals[0] = "0")
{
...