Menu

Problem with save - update

2004-11-18
2013-03-07
  • André Ribeiro

    André Ribeiro - 2004-11-18

    Hi, I 'm having a problem with update. The final sql must be:
    UPDATE Categoria SET cate_tx_servico=@p2, cate_cd_grupo=@p3, cate_in_desempenhoSMS=@p4, cate_in_certificacaoISO=@p5, cate_in_certificacaoMOB=@p6, cate_in_prazoLongo=@p7, cate_in_contratoresult=@p8, cate_in_qualificacaoMOB=@p9, cate_in_premioDescontoSMS=@p10, cate_in_produtividade=@p11, cate_in_escolaridadeMOB=@p12, cate_in_premioCertifMOB=@p13, cate_in_escopo=@p14 WHERE  Categoria.cate_cd_categoria = @p15" but the final code stays:
    UPDATE Categoria SET cate_tx_servico=@p2, cate_cd_grupo=@p3, cate_in_desempenhoSMS=@p4, cate_in_certificacaoISO=@p5, cate_in_certificacaoMOB=@p6, cate_in_prazoLongo=@p7, cate_in_contratoresult=@p8, cate_in_qualificacaoMOB=@p9, cate_in_premioDescontoSMS=@p10, cate_in_produtividade=@p11, cate_in_escolaridadeMOB=@p12, cate_in_premioCertifMOB=@p13, cate_in_escopo=@p14 WHERE  Categoria.cate_cd_categoria = _15_"

    The final update didn't replace the "_15_" for "@p15". The line 1341 at the class CClassMap "p = m_updateStatement.Parameters.Item(i)" but the code "x = x.Replace("_" & i.ToString & "_", Me.RelationalDatabase.getParamHolder(i))" at line 1350 in last parameter tries to replace "_14_" for "@p15" and obviously don't find. I am doing anything wrong I have to replace this line to "x = x.Replace("_" & (i+1).ToString & "_", Me.RelationalDatabase.getParamHolder(i))"?

    The insert line is ok but the update is wrong. What can I do?
    Thank you,
    Andr Ribeiro

     
    • Richard Banks

      Richard Banks - 2004-12-02

      Can you get the latest code from CVS and try it again.

      I'm pretty sure that this was fixed a few weeks ago.

       

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.