D
Dan
why doesn't this work?
this.AnnvrsryDay = (Int16)myDataRow["AnnvrsryDay"];
this.AnnvrsryDay is a Int16 in the class
myDataRow["AnnvrsryDay"] is an Int16 in my database, and at the time
the error is generated = 24
Error: InvalidCastException
Specified cast is not valid.
If I don't do the cast at all (Since it's an Int16 all the way through
I get a complie error because myDataRow["AnnvrsryDay"] is an object,
and my only option is ToString(), which then fails to compile with
cna't convert string to 'short'
What am I missing?
this.AnnvrsryDay = (Int16)myDataRow["AnnvrsryDay"];
this.AnnvrsryDay is a Int16 in the class
myDataRow["AnnvrsryDay"] is an Int16 in my database, and at the time
the error is generated = 24
Error: InvalidCastException
Specified cast is not valid.
If I don't do the cast at all (Since it's an Int16 all the way through
I get a complie error because myDataRow["AnnvrsryDay"] is an object,
and my only option is ToString(), which then fails to compile with
cna't convert string to 'short'
What am I missing?