`
peonyzzdx
  • 浏览: 597650 次
  • 性别: Icon_minigender_2
  • 来自: 杭州
社区版块
存档分类
最新评论

异常:Error: executeQueryForObject returned too many results.

阅读更多



QueryForObject方法返回的是一个对象,如果有多个对象的话,就会报异常。
如果有多条返回结果,不应该用executeQueryForObject,应该用executeForObjectList。
returned too many results说的是返回的值多于一个了,executeQueryForObject要求只返回一个值。

想得到一条记录,结果数据库有多条记录。就出现此异常了。
  • 大小: 80.4 KB
分享到:
评论

相关推荐

    EurekaLog_7.5.0.0_Enterprise

    2)....Fixed: Range check error in processes information for x64 machines (affects startup of any EurekaLog-enabled module) 3)....Fixed: Auto-detect personality by project extension if --el_mode switch...

    微软内部资料-SQL性能优化3

    It is up to the application to define what consistency means, and isolation in some form is needed to achieve consistent results. SQL Server uses locking to achieve isolation. Definition of ...

    雷达技术知识

    slopes with LiDAR is because most LiDAR pulses are absorbed or not returned from the water surface. However, where the angle of incidence is close to nadir (i.e. the LiDAR pulse is fired near ...

    微软内部资料-SQL性能优化5

    Both Index Types Have Many Common Features An index consists of a tree with a root from which the navigation begins, possible intermediate index levels, and bottom-level leaf pages. You use the index ...

    BUS Hound

    Please refer to the table for details of each phase type. <br>Phase Description ADDR 8 byte 1394 transfer address ATI 7 byte ATA task file returned from an IDE device ATO 7 byte ATA task ...

Global site tag (gtag.js) - Google Analytics