Informix

 View Only
  • 1.  .Net Core with IBM DB2 EF Core. Datetime format issue

    Posted 3 days ago
    When Im trying to update the database via context.savechanges() method I'm getting 
    Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index') Exeception 

    Following are the parameters passing for my query inside .Net call savechanges(). seems that datetime is passing as a incorrect format. how to change this format since it is auto generating one within EF core ??

    Executing DbCommand [Parameters=[@p0='4814186207' (Nullable = false) (Size = 20), @p1='55' (Size = 100), @p2='411' (Size = 4), @p3='3' (Size = 4), @p4='740.30' (Size = 16), @p5='1' (Nullable = true) (Size = 4), @p6='2' (Nullable = true) (Size = 4), @p7='1' (Size = 4), @p17='255' (Size = 4), @p8='2022-06-23T11:40:15.1458694+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p9='2291.00' (Size = 16), @p10='86.50' (Size = 16), @p11='86.50' (Size = 16), @p12='2' (Size = 4), @p13='2022-06-23T11:40:15.1454241+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p14='2022-06-23T11:40:15.1454905+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p15='12' (Size = 4), @p16='86.50' (Size = 16), @p27='256' (Size = 4), @p18='2022-06-23T11:40:15.1507871+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p19='2291.00' (Size = 16), @p20='86.50' (Size = 16), @p21='173.00' (Size = 16), @p22='2' (Size = 4), @p23='2022-06-23T11:40:15.1507856+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p24='2022-06-23T11:40:15.1507863+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p25='12' (Size = 4), @p26='86.50' (Size = 16), @p37='257' (Size = 4), @p28='2022-06-23T11:40:15.1507980+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p29='2291.00' (Size = 16), @p30='86.50' (Size = 16), @p31='259.50' (Size = 16), @p32='2' (Size = 4), @p33='2022-06-23T11:40:15.1507976+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p34='2022-06-23T11:40:15.1507977+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p35='12' (Size = 4), @p36='86.50' (Size = 16), @p47='258' (Size = 4), @p38='2022-06-23T11:40:15.1508093+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p39='2291.00' (Size = 16), @p40='86.50' (Size = 16), @p41='346.00' (Size = 16), @p42='2' (Size = 4), @p43='2022-06-23T11:40:15.1508090+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p44='2022-06-23T11:40:15.1508090+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p45='12' (Size = 4), @p46='86.50' (Size = 16), @p57='259' (Size = 4), @p48='2022-06-23T11:40:15.1508146+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p49='2291.00' (Size = 16), @p50='86.50' (Size = 16), @p51='432.50' (Size = 16), @p52='2' (Size = 4), @p53='2022-06-23T11:40:15.1508143+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p54='2022-06-23T11:40:15.1508144+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p55='12' (Size = 4), @p56='86.50' (Size = 16), @p58='4814186207' (Nullable = false) (Size = 20), @p59='411' (Size = 4), @p60='2022-06-23T11:40:14.8183663+05:30' (Nullable = true) (Size = 16) (Precision = 13) (DbType = DateTime), @p61='0' (Nullable = true) (Size = 16), @p62='519.00' (Size = 16), @p63='2810' (Size = 16), @p64='1' (Size = 4), @p65='1' (Nullable = true) (Size = 4), @p66='1' (Size = 4), @p67='2022-11-25T09:44:34.0000000' (Size = 16) (Precision = 13) (DbType = DateTime), @p68='2022-11-25T09:44:34.0000000' (Size = 16) (Precision = 13) (DbType = DateTime), @p69='1' (Size = 4), @p70='519.00' (Size = 16), @p71='0' (Nullable = true) (Size = 16), @p72='4814186207' (Nullable = false) (Size = 20), @p73='55' (Size = 10), @p74='411' (Size = 4), @p75='0' (Nullable = true) (Size = 16), @p76='21' (Nullable = false) (Size = 5), @p77='0001-01-01T00:00:00.0000000' (Size = 16) (Precision = 13) (DbType = DateTime), @p78='0' (Nullable = true) (Size = 16), @p79='0' (Nullable = true) (Size = 16), @p80='2810' (Size = 16), @p81='1' (Size = 4), @p82='0' (Nullable = true) (Size = 4), @p83='0' (Nullable = true) (Size = 4), @p84='D' (Nullable = false) (Size = 100), @p85='1' (Size = 4), @p86='1' (Size = 4), @p87='31' (Nullable = false) (Size = 100), @p88='2022-11-25T09:44:34.0000000' (Size = 16) (Precision = 13) (DbType = DateTime), @p89=NULL (Size = 100), @p90='4814186207' (Nullable = false) (Size = 20), @p91='411' (Size = 4), @p92='C' (Nullable = false) (Size = 5), @p93='ASSESS_CORRECT' (Size = 20), @p94='2022-06-23T11:40:21.0347372+05:30' (Size = 16) (Precision = 13) (DbType = DateTime), @p95='' (Size = 100), @p96='2022-06-23T11:40:21.0348584+05:30' (Size = 16)

    ------------------------------
    Asiri Rajapaksa
    ------------------------------


  • 2.  RE: .Net Core with IBM DB2 EF Core. Datetime format issue

    InnerCircle
    Posted 3 days ago
    Can you verify your theory about bad datetime format causing this problem, by simply putting your own literal values with correct format?

    ------------------------------
    Andreas Legner
    ------------------------------