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

only half of unicode string is inserted. #178

Open
huifly opened this issue Apr 26, 2022 · 0 comments
Open

only half of unicode string is inserted. #178

huifly opened this issue Apr 26, 2022 · 0 comments

Comments

@huifly
Copy link

huifly commented Apr 26, 2022

My Database is SQL Server 2019,collation is Chinese_PRC_CI_AI.
table test:
create table test (id int, name varchar(50), primary key (id))

code:
stmt, err := db.Prepare("insert into test(id, name) values(?,?)")
stmt.Exec(1, "张三")

result:
only "张" is inserted.

solution:
modify param.go line 71
case p.isDescribed:
sqltype = p.SQLType
// size should be column size.
if p.Size != 0 {
size = p.Size
}

tooilxui added a commit to tooilxui/odbc that referenced this issue Jun 7, 2022
tooilxui pushed a commit to tooilxui/odbc that referenced this issue Jun 7, 2022
tooilxui added a commit to tooilxui/odbc that referenced this issue Jun 7, 2022
tooilxui added a commit to tooilxui/odbc that referenced this issue Jun 7, 2022
tooilxui added a commit to tooilxui/odbc that referenced this issue Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant