DapperLib / DapperLib/Dapper

Double occurs "Error parsing column"

Open
#1,857 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

We encountered a strange problem, sometimes "Error parsing column" exception occurs when executing the procedure.
When cs15 has the same value, sometimes it goes wrong, sometimes not, we can't figure out how to reproduce and fix it, hope someone can help us.

This is db schema :
[cs15] [decimal](9, 4) NULL

And this is declare type in c# :
public double Cs15 { get; set; }

"Message": "Error parsing column 27 (cs15=0.0000 - Decimal)", "StackTraceString": " at Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value) in /_/Dapper/SqlMapper.cs:line 3706\n at Deserializec777c448-0a1b-40d4-aa8d-397d18c753ac(IDataReader )\n at Dapper.SqlMapper.QueryImpl[T](IDbConnection cnn, CommandDefinition command, Type effectiveType)+MoveNext() in /_/Dapper/SqlMapper.cs:line 1113\n at System.Collections.Generic.List1..ctor(IEnumerable1 collection)\n at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source)\n at Dapper.SqlMapper.Query[T](IDbConnection cnn, String sql, Object param, IDbTransaction transaction, Boolean buffered, Nullable1 commandTimeout, Nullable1 commandType) in /_/Dapper/SqlMapper.cs:line 734\n at SunplusBettingLibrary.Repository.BaseRepository.StoredProcedureExecute[T](String spName, Object param)\n at SunplusBettingLibrary.Repository.BetRepository.GetAnOddsExModel(GetOddsCriteriaModel getOddsCriteriaModel)\n at SunplusBettingLibrary.Service.GetOddsService.GetAnOddsTableEx(GetOddsCriteriaModel getOddsCriteriaModel, Int32 custId, Boolean isDebugMode, Action1 saveBetTypeMappingAction, Action letRobotUserSleepAction)\n at SunplusBettingLibrary.BettingBase.GetAnOddsTableEx()\n at OneLab.CommonCache.Standard.Base.GetCache(String inputkey)\n at SunplusBettingLibrary.BettingBase.GetAnOddsEx(Int32 oddsId, Int32 betType, Int32 parentBetType, Boolean disabledCache, Int32 custId, Int32 sportType, Boolean debugMode, Int32 matchId, String marketId)\n at SunplusBettingLibrary.UnderOver.GetBettingInfo(UnderOverTicket ticket, Boolean DisabledCache, DataRow RowData)"

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at Dapper/SqlMapper.cs around lines 3706, 1113, and 734, using the reported Query path and the decimal cs15-to-double mapping as context. First obtain a reproducible stored-procedure result or a focused failing test; done means the intermittent parsing failure is explained and a verified fix or documented limitation is established.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
backend, database
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.