http://stackoverflow.com/q/13839754/1825719
SQL Server Data Types and Their .NET Framework Equivalents
http://msdn.microsoft.com/en-us/library/ms131092%28v=sql.90%29.aspx
"Specified cast is not valid."
myReader.GetValue(44) is showing a value of 0.0 when this happens. 这个问题会在0值出现错误,一般数值则无错
SQL Server data type CLR data type (SQL Server) CLR data type (.NET Framework)
float SqlDouble Double
the SQL float maps to the double datatype, so you should try using GetDouble
instead of GetFloat
以前getfloat其实用错了,只是没有用来读取0,一旦读0就报错。正解是GetDouble