Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database/sql: "unsupported type from server string=" #22951

zhaohansprt opened this issue Dec 1, 2017 · 2 comments

database/sql: "unsupported type from server string=" #22951

zhaohansprt opened this issue Dec 1, 2017 · 2 comments


Copy link

@zhaohansprt zhaohansprt commented Dec 1, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?


Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?

win10 X64 i7 7700HQ

What did you do?

I used go/database/sql and "" called a sql server 2012sp3 's proc with output param as the sql.Out example shows
as below:

var strErrorDescribe string
	_, err = db.GetmyssqlDB().ExecContext(context.Background(), "NET_PW_InsureIn",
		sql.Named("dwUserID", m.UserId),
		sql.Named("dwScore", m.MoneyAmount),
		sql.Named("strErrorDescribe", sql.Out{Dest: &strErrorDescribe}))

strErrorDescribe is the NVARCHAR(127) OUTPUT param
but i got err as "unsupported type from server string=存款成功!"
and the 'strErrorDescribe' returned value is ""

What did you expect to see?

strErrorDescribe should contain 存款成功 as returned value

What did you see instead?

the 'strErrorDescribe' returned value is ""

Copy link

@zhaohansprt zhaohansprt commented Dec 3, 2017


Copy link

@kardianos kardianos commented Dec 3, 2017

This is a driver issue, already reported. Search issues on driver.

@kardianos kardianos closed this Dec 3, 2017
@golang golang locked and limited conversation to collaborators Dec 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.