ora icon indicating copy to clipboard operation
ora copied to clipboard

Parameter binding problem

Open shawnhsy opened this issue 6 years ago • 1 comments

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

shawnhsy avatar May 07 '18 02:05 shawnhsy

Strange. Both should fail, as binding by position requires as many arguments, as many :number in the query.

tgulacsi avatar May 07 '18 05:05 tgulacsi