Sqlite Provider InvalidCastException
See original GitHub issueWhen using the Sqlite Provider i encountered the following error.
An unhandled exception occurred while processing the request.
InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Double'.
Deserialize0693dad1-08a7-4b56-b158-09ed5699f3a7(IDataReader )
DataException: Error parsing column 5 (StartMilliseconds=120 - Int64)
Dapper.SqlMapper.ThrowDataException(Exception ex, int index, IDataReader reader, object value) in SqlMapper.cs, line 3665
This is similar to the final message in the PR #221
It seems to stem from the dynamic datatypes of Sqlite.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Why am I getting "Invalid Cast Exception" with this SQLite ...
In this context the ExecuteScalar returns a System.Int64 . Applying the (int) cast creates the exception you are seeing object result = cmd....
Read more >Re: System.InvalidCastException: System.Data.SQLite. ...
My Sqlite DB column ImageBlob is Image type, can be NULL. When the image is NULL, I get System.InvalidCastException.
Read more >Specified cast is not valid.
This is the Code in C#: SQLiteDataReader rdr; SQLiteCommand contentCommand; String cmd = String.Format("SELECT filename,content,filesize FROM documents ...
Read more >Bug - InvalidCastException: Specified cast is not valid.
Hello everyone, I am a newly started game developer, and some errors occurred while using sqlite as a game save file.
Read more >[Fixed]-C# Sqlite InvalidCastException - appsloveworld.com
Best coding solution for query C# Sqlite InvalidCastException. ... I have this function that makes a command for my SQLiteDataAdapter, Now it works...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I happen to be working on this after a long break just this week - this will be in a 4.3 release soon 😃
Going to close this our since #582 is merged in - look out for a 4.3 release on NuGet soon, but already on MyGet now 😃