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

Closed
zhaohansprt opened this issue Dec 1, 2017 · 2 comments
Closed

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

zhaohansprt opened this issue Dec 1, 2017 · 2 comments

Comments

@zhaohansprt
Copy link

zhaohansprt commented Dec 1, 2017

Please answer these questions before submitting your issue. Thanks!

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

1.9.2

Does this issue reproduce with the latest release?

yes

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 "github.com/denisenkom/go-mssqldb" 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 ""

@zhaohansprt
Copy link
Author

.........

@kardianos
Copy link
Contributor

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

@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.
Projects
None yet
Development

No branches or pull requests

3 participants