ARTICLE AD BOX
I am stuck in a problem where I only got one row returned from a database table with +1000 rows. The code is similar to code elsewhere i the program and in other project:
responders := []model.ConfirmationResponder{} query := `SELECT [confirmation_responder_id] ,[entity_id] FROM [confirmation_responder] ` rows, err := MyDB.QueryContext(context.Background(), query) if err != nil { return responders, err } defer rows.Close() if rows.Next() { var responder model.ConfirmationResponder err := rows.Scan(&responder.ConfirmationResponderID,&responder.EntityID) if err != nil { return responders, err } responders = append(responders, responder) }I have tried with both Query and QueryRowContext all with same result.
As mentioned above, I don't think the code is the problem but some hidden configuration. Who knows?. There is no errors returned. The database is a MS SqlServer.
Any clues?
Explore related questions
See similar questions with these tags.
