question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sqlite Provider InvalidCastException

See original GitHub issue

When 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:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
NickCravercommented, Feb 9, 2023

I happen to be working on this after a long break just this week - this will be in a 4.3 release soon 😃

0reactions
NickCravercommented, Feb 9, 2023

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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found