rmmarsh
asked on
Specified cast is not valid?
This is my statement:
The field is defined as "char" in a Firebird table. How should I cast this?
if ((byte)data["TranC"] == 'A')
The field is defined as "char" in a Firebird table. How should I cast this?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
did you try the
data["TranC"].ToString() == "A";//?
data["TranC"].ToString() == "A";//?
ASKER
I'm going to give you the points because you were very close... this is what I wound up doing:
shipping = uint.Parse(data["Shipping" ].ToString ());
And it appears to be working... thank you for the time...
shipping = uint.Parse(data["Shipping"
And it appears to be working... thank you for the time...
ASKER
And then I did this: if (int.Parse(data["TranC"].T
and the CLR tells me the input string was not in the correct format!
Any other suggestions?