ora
ora copied to clipboard
Parameter binding problem
found a bug in parameter binding:
this works fine
rset, err := session.PrepAndQry("select :1 as \"p1\", :2 as \"p2\", :1 as \"p1-again\" from dual ", "v-1" , "v-2")
but this:
rset, err := session.PrepAndQry("select :1 as \"p1\", :1 as \"p1-again\", :2 as \"p2\" from dual ", "v-1" , "v-2")
returns a " ORA-01008: not all variables bound" error
Strange. Both should fail, as binding by position requires as many arguments, as many :number in the query.