Parameterized query in Oracle trouble

前端 未结 6 905
走了就别回头了
走了就别回头了 2020-12-10 02:14

I\'m using Oracle.DataAccess rather than the obsolete System.Data.OracleClient and I seem to be having trouble passing multiple parameters to my up

6条回答
  •  感动是毒
    2020-12-10 03:04

    The first code block is correct: use a colon in front of the parameter name, but not in the first argument to OracleParameter.

    If no errors are thrown, it could be that the UPDATE runs successfully, it just doesn't update any records based on the WHERE clause and its substituted parameter value. Try doing it on a test table with no WHERE clause in the UPDATE to make sure it does something.

提交回复
热议问题