InvalidCast Exception in Typed Dataset
-
Ok maybe I am going dumb here, but I cannot for the life of me figure this problem out. In the MSDE database there is a column called Slides. In that Slide table there is a Version column. Which is defined as a string. It contains data like 1.0.0. Well i am trying to create a typedataset where I just dragged and dropped the Slide table from the server explorer. That being said, when I go in for the Fill command, I keep getting the InvalidCastException. I tried changing the column types to double etc...but no go. Any suggestion. Thanks Sameer
-
Ok maybe I am going dumb here, but I cannot for the life of me figure this problem out. In the MSDE database there is a column called Slides. In that Slide table there is a Version column. Which is defined as a string. It contains data like 1.0.0. Well i am trying to create a typedataset where I just dragged and dropped the Slide table from the server explorer. That being said, when I go in for the Fill command, I keep getting the InvalidCastException. I tried changing the column types to double etc...but no go. Any suggestion. Thanks Sameer
-
1- use float casting . or 2- change the column data type into float numbers and tell us what did you get still having that problem or not ? Mess With The Best And Die Like The Rest
Actually I am an idiot...the problem was in my DAL. When I wrote this function called RunSqlReturnDS( string cmd , table ) well lets just say I hardcoded the table array position..i.e m_dataHolder.Tables[0].Rows..you get the idea. So, it was returning rows from the previous run of the function.