You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am querying a table I don't know the schema of. So I am using this to gather the table contents:
cols, err := rows.Columns() // Remember to check err afterwards
vals := make([]interface{}, len(cols))
for i, _ := range cols {
vals[i] = new(sql.RawBytes)
}
for rows.Next() {
if err := rows.Scan(vals...); err != nil {
// Check for a scan error.
// Query rows will be closed with defer.
log.Fatal(err)
}
log.Info(vals)
}
However when I get to a column with type money I get the following error:
unsupported Scan, storing driver.Value type tds.Num into type *sql.RawBytes
The text was updated successfully, but these errors were encountered:
Thanks for reporting.
Could you please let me know what you plan to do with the rawBytes ?
It's a money type so I do not return the exact same data type as the one I receive on the wire.
For example you can perfectly scan to an array of interfaces, without populating it with rawByte values.
I am querying a table I don't know the schema of. So I am using this to gather the table contents:
However when I get to a column with type money I get the following error:
The text was updated successfully, but these errors were encountered: