[go-nuts] database/sql - prepared select statements only work on first invocation

2017-08-28 Thread Tamás Gulácsi
QueryRow closes the underlyin Stmt - see the docs. -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, vis

[go-nuts] database/sql - prepared select statements only work on first invocation

2017-08-16 Thread Ain
Hi I tried to use prepared statements and it works first time, but fails on second query. Ie code like tx, err := db.Begin() if err != nil { log.Fatalf("Error starting tx: %v", err) } defer tx.Rollback() st, err := tx.Prepare("select foo from t where id=?") if err