Menu

Problem in version 2 with null

2004-11-05
2013-03-07
  • Marcos Flavio de Oliveira

    The SQL below didnt return the data, but the data is in table. The problem is with the field tb_Orcamento_PA.Dth_Modificacao (NULL)

    @p1: 000004C200F1
    @p2: 5/11/2004 14:57:46
    @p3: 5/11/2004 15:01:09
    @p4: 0000042D001B
    @p5: 0000031D0002
    @p6: 2500
    @p7: 2500
    @p8: 000004C200F1
    @p9: 5/11/2004 14:57:46
    @p10: NULL
    UPDATE tb_Orcamento_PA SET OID_Orcamento_PA=@p1, Dth_Criacao=@p2, Dth_Modificacao=@p3, OID_Orcamento_UG=@p4, OID_Projeto_Atividade=@p5, Val_Atual_PA=@p6, Val_Saldo_PA=@p7 WHERE  tb_Orcamento_PA.OID_Orcamento_PA = @p8 AND tb_Orcamento_PA.Dth_Criacao = @p9 AND tb_Orcamento_PA.Dth_Modificacao = @p10

     
    • Richard Banks

      Richard Banks - 2004-11-07

      Hi Marcos

      It the nul handling of the SQL server that makes the difference.

      Add the following to your database definition in the XML mapping and you should be OK

      <parameter name="ansinulls" value="true">

      This will cause the SQL to use IS NULL instead of = @p10.

      - Richard.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.