Using the driver github.com/microsoft/go-mssqldb to interact with MS SQL Server.
In this code snippet, the return value from the procedure should be read into the result variable. However, the result value does not change, the value is not returned.
var result int = 1
_, err = dbobj.data.SqlDb.Exec("writeOrderPackages @msg, @result",
sql.Named("msg", string(msgRune)),
sql.Named("result", sql.Out{Dest: &result}),
)
I want to understand what the problem is, according to the documentation, I’m doing everything right, the procedure is running on the server, but the result does not get into the variable