Quantcast
Channel: SQL Server Compact & SQLite Toolbox
Viewing all articles
Browse latest Browse all 2796

Created Unassigned: Exception reading float [11806]

$
0
0
I'm using "Add LINQ to SQL Datacontext".

When querying one table I get an InvalidCastException.

var test = from row in db.Batch select row;
foreach (var x in test)
Console.WriteLine(x);

It appears that a column of type float is the problem:
I can get data from other columns:

var test = from row in db.Batch select row.ColumnA; //(not float)

but when I query the column of type float the exception is thrown

var test = from row in db.Batch select row.ColumnB; //(float)

Viewing all articles
Browse latest Browse all 2796

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>