Do a:
rst, err := stmt.Qry(params...)
The 3 dots will expand the slice for the variadic function.
Le vendredi 24 février 2017 16:05:42 UTC+1, Trond Kandal a écrit :
>
> Thank Your for your answer, Sir!
>
> Hmmm...
> I do not seem to get it working
>
> sqlQry := "SELECT * FROM TIA_EMNEINFO WHERE EMNEKODE = :1"
>
> stmt, err := ses.Prep(sqlQuery,
> ora.OraI64, ora.OraS, ora.OraS, ora.OraS, ora.OraS, ora.OraS, ora.OraI64,
> ora.OraS, ora.OraI64, ora.L, ora.L, ora.OraI64)
>
> defer stmt.Close()
>
> if err != nil {
>
> ...
>
> }
>
> params = []interface{}{"BI101714"}
> rst, err := stmt.Qry(params)
>
> ...
>
>
> (The parameter is supposed to be a string)
>
>
> Then I get:
>
> error = Stmt.qryC Stmt.bind Invalid bind parameter. ([]interface{})
> ([BI101714]).
>
>
> By the way, how do I extend the params with more parameters as I
> collect the GET-parameters?
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.