Parameterized Queries for Oracle DB Connections

Parameterized Queries for Oracle DB Connections

Comments

  • Hi, Im trying to create a defined query for an Oracle DB connection with input parameters, but I cant get the parameters to appear.
    Heres my query:

    update (myTable)
    set colB = @B
    where colA = @A

    Is there something wrong with my syntax?

  • Hi Betsy, Oracle DB connections in Decisions are slightly different from the usual MSSQL connections. Instead of using @ to indicate a parameter, try using a colon ( : ). This difference for parameters is due to the fact that C# uses different characters in its syntax for referencing variables for LINQ queries to different kinds of databases. For MSSQL DB connections, that symbol is @, and for OracleDB connections it is :. So your defined query would look like this:

    update (myTable)
    set colB = :B
    where colA = :A
    [i]edited by james.hartzell@decisions.com on 12/2/2019[/i]

Sign In or Register to comment.